gunicorn_log.conf 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. ########################################
  2. # Definition for the different objects
  3. #
  4. # Directories where log files are kept must already exist.
  5. # That's why we pick /tmp.
  6. #
  7. # The loggers are configured to write to the log files ONLY.
  8. # Developers may set the DESKTOP_DEBUG environment variable to
  9. # enable stderr logging output.
  10. ########################################
  11. [logger_root]
  12. level=NOTSET
  13. handlers=logfile,errorlog
  14. [logger_access]
  15. level=NOTSET
  16. handlers=accesslog
  17. qualname=access
  18. [logger_django_auth_ldap]
  19. level=NOTSET
  20. handlers=accesslog
  21. qualname=django_auth_ldap
  22. [logger_kazoo_client]
  23. level=NOTSET
  24. handlers=errorlog
  25. qualname=kazoo.client
  26. [logger_djangosaml2]
  27. level=NOTSET
  28. handlers=errorlog
  29. qualname=djangosaml2
  30. [logger_requests_packages_urllib3_connectionpool]
  31. level=NOTSET
  32. handlers=errorlog
  33. qualname=requests.packages.urllib3.connectionpool
  34. [logger_django_db]
  35. level=NOTSET
  36. handlers=errorlog
  37. qualname=django.db.backends
  38. [logger_boto]
  39. level=NOTSET
  40. handlers=errorlog
  41. qualname=boto
  42. [handler_stderr]
  43. class=StreamHandler
  44. formatter=default
  45. level=NOTSET
  46. args=(sys.stderr,)
  47. [handler_accesslog]
  48. class=handlers.RotatingFileHandler
  49. level=NOTSET
  50. propagate=True
  51. formatter=access
  52. args=('%LOG_DIR%/access.log', 'a', 5000000, 5)
  53. [handler_errorlog]
  54. class=handlers.RotatingFileHandler
  55. level=NOTSET
  56. formatter=default
  57. args=('%LOG_DIR%/error.log', 'a', 5000000, 5)
  58. [handler_logfile]
  59. class=handlers.RotatingFileHandler
  60. # Choices are DEBUG, INFO, WARNING, ERROR, CRITICAL
  61. level=NOTSET
  62. formatter=default
  63. args=('%LOG_DIR%/rungunicornserver.log', 'a', 5000000, 5)
  64. [formatter_default]
  65. class=logging.Formatter
  66. format=[%(asctime)s] %(module)-12s %(levelname)-8s %(message)s
  67. datefmt=%d/%b/%Y %H:%M:%S %z
  68. [formatter_access]
  69. class=logging.Formatter
  70. format=[%(asctime)s] %(levelname)-8s %(message)s
  71. datefmt=%d/%b/%Y %H:%M:%S %z
  72. ########################################
  73. # A summary of loggers, handlers and formatters
  74. ########################################
  75. [loggers]
  76. keys=root,access,django_auth_ldap,kazoo_client,requests_packages_urllib3_connectionpool,djangosaml2,django_db,boto
  77. [handlers]
  78. keys=stderr,logfile,accesslog,errorlog
  79. [formatters]
  80. keys=default,access