log.conf 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. class=desktop.log.formatter.Formatter
  37. format=[%(asctime)s] %(module)-12s %(levelname)-8s %(message)s
  38. datefmt=%d/%b/%Y %H:%M:%S %z
  39. [formatter_access]
  40. class=desktop.log.formatter.Formatter
  41. format=[%(asctime)s] %(levelname)-8s %(message)s
  42. datefmt=%d/%b/%Y %H:%M:%S %z
  43. [loggers]
  44. keys=root,access
  45. [handlers]
  46. keys=logfile,accesslog,errorlog
  47. [formatters]
  48. keys=default,access