log.conf 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. ##########################################
  2. # To change the log leve, edit the `level' field.
  3. # Choices are: DEBUG, INFO, WARNING, ERROR, CRITICAL
  4. #
  5. # The logrotation limit is set at 5MB per file for a total of 5 copies.
  6. # I.e. 25MB for each set of logs.
  7. ##########################################
  8. [handler_logfile]
  9. level=INFO
  10. class=handlers.RotatingFileHandler
  11. formatter=default
  12. args=('%LOG_DIR%/%PROC_NAME%.log', 'a', 5000000, 5)
  13. ##########################################
  14. # Please do not change the settings below
  15. ##########################################
  16. [logger_root]
  17. handlers=logfile,errorlog
  18. [logger_access]
  19. handlers=accesslog
  20. qualname=access
  21. # The logrotation limit is set at 5MB per file for a total of 5 copies.
  22. # I.e. 25MB for each set of logs.
  23. [handler_accesslog]
  24. class=handlers.RotatingFileHandler
  25. level=DEBUG
  26. propagate=True
  27. formatter=access
  28. args=('%LOG_DIR%/access.log', 'a', 5000000, 5)
  29. # All errors go into error.log
  30. [handler_errorlog]
  31. class=handlers.RotatingFileHandler
  32. level=ERROR
  33. formatter=default
  34. args=('%LOG_DIR%/error.log', 'a', 5000000, 5)
  35. [formatter_default]
  36. format=[%(asctime)s] %(module)-12s %(levelname)-8s %(message)s
  37. datefmt=%d/%b/%Y %H:%M:%S +0000
  38. [formatter_access]
  39. format=[%(asctime)s] %(levelname)-8s %(message)s
  40. datefmt=%d/%b/%Y %H:%M:%S +0000
  41. [loggers]
  42. keys=root,access
  43. [handlers]
  44. keys=logfile,accesslog,errorlog
  45. [formatters]
  46. keys=default,access