log.conf 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # Licensed to Cloudera, Inc. under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. Cloudera, Inc. licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. ########################################
  17. # Definition for the different objects
  18. # - FOR DEVELOPMENT ONLY -
  19. #
  20. # Directories where log files are kept must already exist.
  21. # That's why we pick /tmp.
  22. #
  23. # The loggers are configured to write to the log files ONLY.
  24. # Developers may set the DESKTOP_DEBUG environment variable to
  25. # enable stderr logging output.
  26. ########################################
  27. [logger_root]
  28. handlers=logfile,errorlog
  29. [logger_access]
  30. handlers=accesslog
  31. qualname=access
  32. [logger_django_auth_ldap]
  33. handlers=accesslog
  34. qualname=django_auth_ldap
  35. [logger_kazoo_client]
  36. level=INFO
  37. handlers=errorlog
  38. qualname=kazoo.client
  39. [logger_djangosaml2]
  40. level=INFO
  41. handlers=errorlog
  42. qualname=djangosaml2
  43. [logger_requests_packages_urllib3_connectionpool]
  44. level=DEBUG
  45. handlers=errorlog
  46. qualname=requests.packages.urllib3.connectionpool
  47. [logger_django_db]
  48. level=DEBUG
  49. handlers=errorlog
  50. qualname=django.db.backends
  51. [handler_stderr]
  52. class=StreamHandler
  53. formatter=default
  54. level=DEBUG
  55. args=(sys.stderr,)
  56. [handler_accesslog]
  57. class=handlers.RotatingFileHandler
  58. level=INFO
  59. propagate=True
  60. formatter=access
  61. args=('%LOG_DIR%/%PROC_NAME%.log', 'a', 1000000, 3)
  62. [handler_errorlog]
  63. class=handlers.RotatingFileHandler
  64. level=ERROR
  65. formatter=default
  66. args=('%LOG_DIR%/%PROC_NAME%.log', 'a', 1000000, 3)
  67. [handler_logfile]
  68. class=handlers.RotatingFileHandler
  69. # Choices are DEBUG, INFO, WARNING, ERROR, CRITICAL
  70. level=DEBUG
  71. formatter=default
  72. args=('%LOG_DIR%/%PROC_NAME%.log', 'a', 1000000, 3)
  73. [formatter_default]
  74. class=desktop.log.formatter.Formatter
  75. format=[%(asctime)s] %(module)-12s %(levelname)-8s %(message)s
  76. datefmt=%d/%b/%Y %H:%M:%S %z
  77. [formatter_access]
  78. class=desktop.log.formatter.Formatter
  79. format=[%(asctime)s] %(levelname)-8s %(message)s
  80. datefmt=%d/%b/%Y %H:%M:%S %z
  81. ########################################
  82. # A summary of loggers, handlers and formatters
  83. ########################################
  84. [loggers]
  85. keys=root,access,django_auth_ldap,kazoo_client,requests_packages_urllib3_connectionpool,djangosaml2,django_db
  86. [handlers]
  87. keys=stderr,logfile,accesslog,errorlog
  88. [formatters]
  89. keys=default,access