mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Further simplify logging configuration by using the 'cli' handler when running yunohost-api in debug mode instead of creating a 'console' handler which is pretty much the same
This commit is contained in:
parent
dbedec3546
commit
0884a0c162
1 changed files with 3 additions and 9 deletions
|
@ -154,14 +154,8 @@ def init_logging(interface="cli", debug=False, quiet=False, logdir="/var/log/yun
|
|||
|
||||
# This is for when launching yunohost-api in debug mode, we want to display stuff in the console
|
||||
if debug:
|
||||
logging_configuration["handlers"]["console"] = {
|
||||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'console',
|
||||
'stream': 'ext://sys.stdout',
|
||||
'filters': ['action'],
|
||||
},
|
||||
logging_configuration["loggers"]["yunohost"]["handlers"].append("console")
|
||||
logging_configuration["loggers"]["moulinette"]["handlers"].append("console")
|
||||
logging_configuration["root"]["handlers"].append("console")
|
||||
logging_configuration["loggers"]["yunohost"]["handlers"].append("cli")
|
||||
logging_configuration["loggers"]["moulinette"]["handlers"].append("cli")
|
||||
logging_configuration["root"]["handlers"].append("cli")
|
||||
|
||||
configure_logging(logging_configuration)
|
||||
|
|
Loading…
Add table
Reference in a new issue