logging.conf 640 B

123456789101112131415161718192021222324252627282930313233
  1. [loggers]
  2. keys=root,simpleExample
  3. [handlers]
  4. keys=consoleHandler,rotateFileHandler
  5. [formatters]
  6. keys=simpleFormatter
  7. [logger_root]
  8. level=DEBUG
  9. handlers=consoleHandler,rotateFileHandler
  10. [logger_simpleExample]
  11. level=DEBUG
  12. handlers=consoleHandler,rotateFileHandler
  13. qualname=simpleExample
  14. propagate=0
  15. [handler_consoleHandler]
  16. class=StreamHandler
  17. level=DEBUG
  18. formatter=simpleFormatter
  19. args=(sys.stdout,)
  20. [handler_rotateFileHandler]
  21. class=handlers.RotatingFileHandler
  22. level=DEBUG
  23. formatter=simpleFormatter
  24. args=('securitypw.log', 'a', 50*1024*1024, 6)
  25. [formatter_simpleFormatter]
  26. format=%(asctime)s - %(name)s - %(levelname)s - %(message)s