Skip to content

Commit

Permalink
Enabling logging with the CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
tino097 committed Sep 27, 2018
1 parent d8dcdc5 commit 66b54bf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ckan/cli/cli.py
Expand Up @@ -7,6 +7,11 @@
from ckan.cli import db, load_config, click_config_option, search_index, server
from ckan.config.middleware import make_app

import logging

log = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)s %(message)s')


class CkanCommand(object):

Expand All @@ -20,6 +25,7 @@ def __init__(self, config=None):
@click_config_option
@click.pass_context
def ckan(ctx, config, *args, **kwargs):
log.info(u'Loading configuration')
ctx.obj = CkanCommand(config)


Expand Down

0 comments on commit 66b54bf

Please sign in to comment.