1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| [loggers] keys=root,simple
[handlers] keys=consoleHandler,fileHandler,rotatingFileHandler
[formatters] keys=simpleFmt
[logger_root] level=DEBUG handlers=consoleHandler # handlers=fileHandler # handlers=rotatingFileHandler
[logger_simple] level=DEBUG handlers=consoleHandler,fileHandler qualname=simple propagate=0
[handler_consoleHandler] class=StreamHandler level=DEBUG formatter=simpleFmt args=(sys.stdout,)
[handler_fileHandler] class=FileHandler level=DEBUG formatter=simpleFmt args=('test.log', 'w')
[handler_rotatingFileHandler] class=handlers.RotatingFileHandler level=DEBUG formatter=simpleFmt args=("python.log", "a", 20*1024*1024, 10)
[formatter_simpleFmt] format=%(asctime)s - %(name)s - %(levelname)s - %(message)s - [%(filename)s:%(lineno)s] datefmt=
|