log.conf 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. format=[%(asctime)s] %(module)-12s %(levelname)-8s %(message)s
  41. datefmt=%d/%b/%Y %H:%M:%S +0000
  42. [formatter_access]
  43. format=[%(asctime)s] %(levelname)-8s %(message)s
  44. datefmt=%d/%b/%Y %H:%M:%S +0000
  45. ########################################
  46. # A summary of loggers, handlers and formatters
  47. ########################################
  48. [loggers]
  49. keys=root,access
  50. [handlers]
  51. keys=stderr,logfile,accesslog,errorlog
  52. [formatters]
  53. keys=default,access