logger_config.yaml 812 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. version: 1
  2. disable_existing_loggers: no
  3. formatters:
  4. simple:
  5. format: "%(asctime)s - %(name)s - %(message)s"
  6. extended:
  7. format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
  8. handlers:
  9. console:
  10. class: logging.StreamHandler
  11. level: DEBUG
  12. formatter: extended
  13. stream: ext://sys.stdout
  14. file_handler:
  15. class: logging.handlers.RotatingFileHandler
  16. level: INFO
  17. formatter: extended
  18. filename: test.log
  19. maxBytes: 5242880
  20. backupCount: 1
  21. encoding: utf8
  22. loggers:
  23. dev:
  24. level: DEBUG
  25. handlers: [console, file_handler]
  26. propagate: no
  27. test:
  28. level: INFO
  29. handlers: [console]
  30. propagate: no
  31. root:
  32. level: DEBUG
  33. handlers: [console, file_handler]