Skip to content

Commit

Permalink
Fixed logging
Browse files Browse the repository at this point in the history
  • Loading branch information
tino097 committed Oct 22, 2018
1 parent 7eb6573 commit 0cc51ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
11 changes: 2 additions & 9 deletions ckan/cli/__init__.py
Expand Up @@ -4,18 +4,13 @@

import click
import logging
from logging.config import fileConfig as loggingFileConfig
from flask import Flask, current_app
from flask.cli import AppGroup, with_appcontext
from werkzeug.serving import run_simple

from ckan.common import config
from ckan.config.environment import load_environment
from ckan.config.middleware import make_app


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


click_config_option = click.option(
Expand All @@ -28,8 +23,6 @@

def load_config(config=None):
from paste.deploy import appconfig
from paste.script.util.logging_config import fileConfig
log.info("Searching for configuration file")
if config:
filename = os.path.abspath(config)
config_source = u'-c parameter'
Expand All @@ -53,5 +46,5 @@ def load_config(config=None):
msg += u'\n(Given by: %s)' % config_source
exit(msg)

fileConfig(filename)
loggingFileConfig(filename)
return appconfig(u'config:' + filename)
1 change: 0 additions & 1 deletion ckan/cli/server.py
Expand Up @@ -17,5 +17,4 @@
@click.pass_context
def run(ctx, host, port, reloader):
u'''Runs development server'''
# click.secho(u"Starting CKAN", fg='yellow')
run_simple(host, port, ctx.obj.app, use_reloader=reloader, use_evalex=True)

0 comments on commit 0cc51ad

Please sign in to comment.