I think the best will be to completly drop this code and just allow to pass a logging configuration file to load.
See: https://docs.python.org/2/library/logging.config.html#
This post explain quite well how real usage could be: http://antonym.org/2005/03/a-real-python-logging-example.html
Cédric Krieradded 1 deleted label and removed 1 deleted label
Do you prefer use of logging.config.fileconfig (external file with config-parser format) or logging.config.dictconfig (external file with JSON format) [1] ? The second one is recommended in Python HowTo [2].
On 17 Jul 11:49, Pierre-Louis Bonicoli wrote:
> Do you prefer use of logging.config.fileconfig (external file with config-parser format) or logging.config.dictconfig (external file with JSON format) [1] ? The second one is recommended in Python HowTo [2].
OK the order of the links lead me to misunderstand.
The JSON format is horrible and not design to be read or write by human, so it should be the configuration format.
New changeset 779c0101239d by Pierre-Louis Bonicoli in branch 'default':
Use a configuration file for logging
http://hg.tryton.org/trytond/rev/779c0101239d
Roundup Robotadded 1 deleted label and removed 1 deleted label