Don't default on logging.INFO level if another level is set in the configuration, and apply the same logging level also to the web server [closes #162]
This commit is contained in:
parent
9b9334682f
commit
5832bc68d5
2 changed files with 11 additions and 1 deletions
|
@ -27,7 +27,6 @@ __author__ = 'Fabio Manganiello <info@fabiomanganiello.com>'
|
|||
__version__ = '0.13.9'
|
||||
|
||||
logger = logging.getLogger('platypush')
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
|
||||
class Daemon:
|
||||
|
|
|
@ -1,12 +1,23 @@
|
|||
import logging
|
||||
import os
|
||||
|
||||
from flask import Flask
|
||||
|
||||
from platypush import Config
|
||||
from platypush.backend.http.app.utils import get_routes
|
||||
|
||||
|
||||
def initialize_logger():
|
||||
logger = logging.getLogger('werkzeug')
|
||||
log_conf = Config.get('logging')
|
||||
if 'level' in log_conf:
|
||||
logger.setLevel(log_conf['level'])
|
||||
|
||||
|
||||
## Webapp initialization
|
||||
|
||||
initialize_logger()
|
||||
|
||||
base_folder = os.path.abspath(os.path.join(
|
||||
os.path.dirname(os.path.abspath(__file__)), '..'))
|
||||
|
||||
|
|
Loading…
Reference in a new issue