gunicorn_log.conf 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. [logger_boto3]
  43. level=NOTSET
  44. handlers=errorlog
  45. qualname=boto3
  46. [logger_botocore]
  47. level=NOTSET
  48. handlers=errorlog
  49. qualname=botocore
  50. [handler_stderr]
  51. class=StreamHandler
  52. formatter=default
  53. level=NOTSET
  54. args=(sys.stderr,)
  55. [handler_accesslog]
  56. class=handlers.RotatingFileHandler
  57. level=NOTSET
  58. propagate=True
  59. formatter=access
  60. args=('%LOG_DIR%/access.log', 'a', 5000000, 5)
  61. [handler_errorlog]
  62. class=handlers.RotatingFileHandler
  63. level=NOTSET
  64. formatter=default
  65. args=('%LOG_DIR%/error.log', 'a', 5000000, 5)
  66. [handler_logfile]
  67. class=handlers.RotatingFileHandler
  68. # Choices are DEBUG, INFO, WARNING, ERROR, CRITICAL
  69. level=NOTSET
  70. formatter=default
  71. args=('%LOG_DIR%/rungunicornserver.log', 'a', 5000000, 5)
  72. [formatter_default]
  73. class=logging.Formatter
  74. format=[%(asctime)s] %(module)-12s %(levelname)-8s %(message)s
  75. datefmt=%d/%b/%Y %H:%M:%S %z
  76. [formatter_access]
  77. class=logging.Formatter
  78. format=[%(asctime)s] %(levelname)-8s %(message)s
  79. datefmt=%d/%b/%Y %H:%M:%S %z
  80. ########################################
  81. # A summary of loggers, handlers and formatters
  82. ########################################
  83. [loggers]
  84. keys=root,access,django_auth_ldap,kazoo_client,requests_packages_urllib3_connectionpool,djangosaml2,django_db,boto,boto3,botocore
  85. [handlers]
  86. keys=stderr,logfile,accesslog,errorlog
  87. [formatters]
  88. keys=default,access