Closed monsieurh closed 6 years ago
I've refactored and documented the code - the problem disappeared somewhere along the way =) Please test if all the features you've put in there are present, and whether you like the code&documentation that I've written.
So, one thing that I've figured out - the log_conf.ini file is not yet compatible with update-from-git feature - as it can even be changed from the UI, it needs to not be tracked in git, rather, it needs to be removed from the git tree and be created dynamically for each user (it'd also be cool to add it to .gitignore).
Fixed the log_conf.ini problem, also, added documentation =)
Sorry, accidentally closed
Thank you for your work! =)
purpose
Deal with issue #40 :
Allowing to tweak logging levels from a config file and command-line
status
Work in progress/broken
implementation
A new singleton class
LoggingConfig
exists inlogger.py
. It's role is to read/write the config file stored in/opt/zpui/log_conf.ini
. A CLI app allows one to check the current config as well as to set an override for an app easily. SendingSIGHUP
to the main zpui thread triggersLoggingConfig().reload_config()
that reads the config file and dispatches the new levels to all the loggers.issues
I've logged the behaviour of
LogginConfig._dispatch_log_levels
and it seems to be dispatching the levels correctly, but for some reason the logger continue to use the level they had when ZPUI started. I'm blocked, please advise