Piotr F. Mieszkowski
75ccfb0850
- Replace custom logging code with calls to logging module. - Use logging.config to provide configuration parameters. To make Lacre's logging more flexible, use fileConfig from logging.config to set up all parameters. If the configuration file is missing, use dictConfig with hardcoded reasonable defaults.
25 lines
353 B
INI
25 lines
353 B
INI
[loggers]
|
|
keys=root
|
|
|
|
[logger_root]
|
|
level=NOTSET
|
|
handlers=lacrelog
|
|
|
|
[handlers]
|
|
keys=lacrelog
|
|
|
|
[formatters]
|
|
keys=postfixfmt
|
|
|
|
[handler_lacrelog]
|
|
class=FileHandler
|
|
level=DEBUG
|
|
formatter=postfixfmt
|
|
args=('test/logs/lacre.log', 'a+')
|
|
|
|
[formatter_postfixfmt]
|
|
format=%(asctime)s %(module)s[%(process)d]: %(message)s
|
|
datefmt=%b %e %H:%M:%S
|
|
style=%
|
|
validate=True
|