[fix] DEBUG-level messages not appearing in actions performed via the API (#603)

This commit is contained in:
Alexandre Aubin 2018-12-20 18:01:09 +01:00 committed by GitHub
parent 3e1064a3df
commit ea77a8ccf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,8 @@ DEFAULT_HOST = 'localhost'
DEFAULT_PORT = 6787 DEFAULT_PORT = 6787
# Level for which loggers will log # Level for which loggers will log
LOGGERS_LEVEL = 'INFO' LOGGERS_LEVEL = 'DEBUG'
API_LOGGER_LEVEL = 'INFO'
# Handlers that will be used by loggers # Handlers that will be used by loggers
# - file: log to the file LOG_DIR/LOG_FILE # - file: log to the file LOG_DIR/LOG_FILE
@ -97,8 +98,10 @@ def _init_moulinette(use_websocket=True, debug=False, verbose=False):
# Define loggers level # Define loggers level
level = LOGGERS_LEVEL level = LOGGERS_LEVEL
api_level = API_LOGGER_LEVEL
if debug: if debug:
level = 'DEBUG' level = 'DEBUG'
api_level = 'DEBUG'
# Custom logging configuration # Custom logging configuration
logging = { logging = {
@ -119,6 +122,7 @@ def _init_moulinette(use_websocket=True, debug=False, verbose=False):
}, },
'handlers': { 'handlers': {
'api': { 'api': {
'level': api_level,
'class': 'moulinette.interfaces.api.APIQueueHandler', 'class': 'moulinette.interfaces.api.APIQueueHandler',
}, },
'file': { 'file': {