log.conf 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. [logger_shell_output]
  22. handlers=shell_output_log
  23. qualname=shell_output
  24. [logger_shell_input]
  25. handlers=shell_input_log
  26. qualname=shell_input
  27. # The logrotation limit is set at 5MB per file for a total of 5 copies.
  28. # I.e. 25MB for each set of logs.
  29. [handler_accesslog]
  30. class=handlers.RotatingFileHandler
  31. level=DEBUG
  32. propagate=True
  33. formatter=access
  34. args=('%LOG_DIR%/access.log', 'a', 5000000, 5)
  35. # All errors go into error.log
  36. [handler_errorlog]
  37. class=handlers.RotatingFileHandler
  38. level=ERROR
  39. formatter=default
  40. args=('%LOG_DIR%/error.log', 'a', 5000000, 5)
  41. [handler_shell_output_log]
  42. class=handlers.RotatingFileHandler
  43. level=INFO
  44. formatter=default
  45. args=('%LOG_DIR%/shell_output.log', 'a', 5000000, 5)
  46. [handler_shell_input_log]
  47. class=handlers.RotatingFileHandler
  48. level=INFO
  49. formatter=default
  50. args=('%LOG_DIR%/shell_input.log', 'a', 5000000, 5)
  51. [formatter_default]
  52. format=[%(asctime)s] %(module)-12s %(levelname)-8s %(message)s
  53. datefmt=%d/%b/%Y %H:%M:%S +0000
  54. [formatter_access]
  55. format=[%(asctime)s] %(levelname)-8s %(message)s
  56. datefmt=%d/%b/%Y %H:%M:%S +0000
  57. [loggers]
  58. keys=root,access,shell_output,shell_input
  59. [handlers]
  60. keys=logfile,accesslog,errorlog,shell_output_log,shell_input_log
  61. [formatters]
  62. keys=default,access