log.conf 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. [handler_stderr]
  18. class=StreamHandler
  19. formatter=default
  20. level=DEBUG
  21. args=(sys.stderr,)
  22. [handler_accesslog]
  23. class=handlers.RotatingFileHandler
  24. level=INFO
  25. propagate=True
  26. formatter=access
  27. args=('%LOG_DIR%/access.log', 'a', 1000000, 3)
  28. [handler_errorlog]
  29. class=handlers.RotatingFileHandler
  30. level=ERROR
  31. formatter=default
  32. args=('%LOG_DIR%/error.log', 'a', 1000000, 3)
  33. [handler_logfile]
  34. class=handlers.RotatingFileHandler
  35. # Choices are DEBUG, INFO, WARNING, ERROR, CRITICAL
  36. level=DEBUG
  37. formatter=default
  38. args=('%LOG_DIR%/%PROC_NAME%.log', 'a', 1000000, 3)
  39. [formatter_default]
  40. class=desktop.log.formatter.Formatter
  41. format=[%(asctime)s] %(module)-12s %(levelname)-8s %(message)s
  42. datefmt=%d/%b/%Y %H:%M:%S %z
  43. [formatter_access]
  44. class=desktop.log.formatter.Formatter
  45. format=[%(asctime)s] %(levelname)-8s %(message)s
  46. datefmt=%d/%b/%Y %H:%M:%S %z
  47. ########################################
  48. # A summary of loggers, handlers and formatters
  49. ########################################
  50. [loggers]
  51. keys=root,access
  52. [handlers]
  53. keys=stderr,logfile,accesslog,errorlog
  54. [formatters]
  55. keys=default,access