gunicorn_log.conf 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. [logger_kazoo_client]
  21. level=INFO
  22. handlers=errorlog
  23. qualname=kazoo.client
  24. [logger_djangosaml2]
  25. level=INFO
  26. handlers=errorlog
  27. qualname=djangosaml2
  28. [logger_requests_packages_urllib3_connectionpool]
  29. level=DEBUG
  30. handlers=errorlog
  31. qualname=requests.packages.urllib3.connectionpool
  32. [logger_django_db]
  33. level=DEBUG
  34. handlers=errorlog
  35. qualname=django.db.backends
  36. [logger_boto]
  37. level=ERROR
  38. handlers=errorlog
  39. qualname=boto
  40. [logger_gunicorn.error]
  41. level=INFO
  42. handlers=errorlog
  43. propagate=1
  44. qualname=gunicorn.error
  45. [logger_gunicorn.access]
  46. level=INFO
  47. handlers=accesslog
  48. propagate=0
  49. qualname=gunicorn.access
  50. [handler_stderr]
  51. class=StreamHandler
  52. formatter=default
  53. level=DEBUG
  54. args=(sys.stderr,)
  55. [handler_stdout]
  56. class=StreamHandler
  57. formatter=default
  58. level=DEBUG
  59. args=(sys.stdout,)
  60. [handler_accesslog]
  61. class=handlers.RotatingFileHandler
  62. level=INFO
  63. propagate=True
  64. formatter=access
  65. args=('%LOG_DIR%/access.log', 'a', 5000000, 5)
  66. [handler_errorlog]
  67. class=handlers.RotatingFileHandler
  68. level=ERROR
  69. formatter=default
  70. args=('%LOG_DIR%/error.log', 'a', 5000000, 5)
  71. [handler_logfile]
  72. class=handlers.RotatingFileHandler
  73. # Choices are DEBUG, INFO, WARNING, ERROR, CRITICAL
  74. level=DEBUG
  75. formatter=default
  76. args=('%LOG_DIR%/rungunicornserver.log', 'a', 5000000, 5)
  77. [formatter_default]
  78. class=logging.Formatter
  79. format=[%(asctime)s] %(module)-12s %(levelname)-8s %(message)s
  80. datefmt=%d/%b/%Y %H:%M:%S %z
  81. [formatter_access]
  82. class=logging.Formatter
  83. format=[%(asctime)s] %(levelname)-8s %(message)s
  84. datefmt=%d/%b/%Y %H:%M:%S %z
  85. ########################################
  86. # A summary of loggers, handlers and formatters
  87. ########################################
  88. [loggers]
  89. keys=root,access,django_auth_ldap,kazoo_client,requests_packages_urllib3_connectionpool,djangosaml2,django_db,boto,gunicorn.error,gunicorn.access
  90. [handlers]
  91. keys=stderr,logfile,accesslog,errorlog,stdout
  92. [formatters]
  93. keys=default,access