log.conf 1.6 KB

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