log.conf 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. ########################################
  2. # Definition for the different objects
  3. # - FOR DEVELOPMENT ONLY -
  4. #
  5. # Directories where log files are kept must already exist.
  6. # That's why we pick /tmp.
  7. #
  8. # The loggers are configured to write to the log files ONLY.
  9. # Developers may set the DESKTOP_DEBUG environment variable to
  10. # enable stderr logging output.
  11. ########################################
  12. [logger_root]
  13. handlers=logfile,errorlog
  14. [logger_access]
  15. handlers=accesslog
  16. qualname=access
  17. [logger_shell_output]
  18. handlers=shell_output_log
  19. qualname=shell_output
  20. [logger_shell_input]
  21. handlers=shell_input_log
  22. qualname=shell_input
  23. [handler_stderr]
  24. class=StreamHandler
  25. formatter=default
  26. level=DEBUG
  27. args=(sys.stderr,)
  28. [handler_accesslog]
  29. class=handlers.RotatingFileHandler
  30. level=INFO
  31. propagate=True
  32. formatter=access
  33. args=('%LOG_DIR%/access.log', 'a', 1000000, 3)
  34. [handler_errorlog]
  35. class=handlers.RotatingFileHandler
  36. level=ERROR
  37. formatter=default
  38. args=('%LOG_DIR%/error.log', 'a', 1000000, 3)
  39. [handler_logfile]
  40. class=handlers.RotatingFileHandler
  41. # Choices are DEBUG, INFO, WARNING, ERROR, CRITICAL
  42. level=DEBUG
  43. formatter=default
  44. args=('%LOG_DIR%/%PROC_NAME%.log', 'a', 1000000, 3)
  45. [handler_shell_output_log]
  46. class=handlers.RotatingFileHandler
  47. level=DEBUG
  48. formatter=default
  49. args=('%LOG_DIR%/shell_output.log', 'a', 1000000, 3)
  50. [handler_shell_input_log]
  51. class=handlers.RotatingFileHandler
  52. level=DEBUG
  53. formatter=default
  54. args=('%LOG_DIR%/shell_input.log', 'a', 1000000, 3)
  55. [formatter_default]
  56. format=[%(asctime)s] %(module)-12s %(levelname)-8s %(message)s
  57. datefmt=%d/%b/%Y %H:%M:%S +0000
  58. [formatter_access]
  59. format=[%(asctime)s] %(levelname)-8s %(message)s
  60. datefmt=%d/%b/%Y %H:%M:%S +0000
  61. ########################################
  62. # A summary of loggers, handlers and formatters
  63. ########################################
  64. [loggers]
  65. keys=root,access,shell_output,shell_input
  66. [handlers]
  67. keys=stderr,logfile,accesslog,errorlog,shell_output_log,shell_input_log
  68. [formatters]
  69. keys=default,access