logging.conf 843 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. [loggers]
  2. keys=root,autocheck
  3. [handlers]
  4. keys=consoleHandler,autocheck
  5. [formatters]
  6. keys=simpleFormatter
  7. #-----------------------------
  8. [logger_root]
  9. level=DEBUG
  10. handlers=consoleHandler
  11. [logger_autocheck]
  12. level=DEBUG
  13. handlers=autocheck
  14. qualname=autocheck
  15. propagate=0
  16. [handler_consoleHandler]
  17. class=StreamHandler
  18. level=DEBUG
  19. formatter=simpleFormatter
  20. args=(sys.stdout,)
  21. [handler_autocheck]
  22. #class=FileHandler
  23. class=logging.handlers.RotatingFileHandler
  24. level=DEBUG
  25. formatter=simpleFormatter
  26. args=('log/autocheck.log','a',1024*1024*20,5)
  27. [formatter_simpleFormatter]
  28. #format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
  29. #format=%(asctime)s %(levelname)-8s %(name)s:%(lineno)d - %(threadName)s-%(thread)d - %(message)s
  30. format=%(asctime)s %(levelname)-8s %(module)s.%(funcName)s:%(lineno)d - %(threadName)s-%(thread)d - %(message)s