From 45889c3811bef9ab0bcceea69515891373c82f5b Mon Sep 17 00:00:00 2001 From: ryanmerolle Date: Fri, 23 Apr 2021 22:38:38 -0400 Subject: [PATCH] commented out the logging --- configuration/logging.py | 107 ++++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 53 deletions(-) diff --git a/configuration/logging.py b/configuration/logging.py index ad6c03f..ec05c88 100644 --- a/configuration/logging.py +++ b/configuration/logging.py @@ -1,53 +1,54 @@ -from os import environ - -# Set LOGLEVEL in netbox.env or docker-compose.overide.yml to override a logging level of INFO. -LOGLEVEL = environ.get('LOGLEVEL', 'INFO') - -LOGGING = { - - 'version': 1, - 'disable_existing_loggers': False, - 'formatters': { - 'verbose': { - 'format': '{levelname} {asctime} {module} {process:d} {thread:d} {message}', - 'style': '{', - }, - 'simple': { - 'format': '{levelname} {message}', - 'style': '{', - }, - }, - 'filters': { - 'require_debug_false': { - '()': 'django.utils.log.RequireDebugFalse', - }, - }, - 'handlers': { - 'console': { - 'level': LOGLEVEL, - 'filters': ['require_debug_false'], - 'class': 'logging.StreamHandler', - 'formatter': 'simple' - }, - 'mail_admins': { - 'level': 'ERROR', - 'class': 'django.utils.log.AdminEmailHandler', - 'filters': ['require_debug_false'] - } - }, - 'loggers': { - 'django': { - 'handlers': ['console'], - 'propagate': True, - }, - 'django.request': { - 'handlers': ['mail_admins'], - 'level': 'ERROR', - 'propagate': False, - }, - 'django_auth_ldap': { - 'handlers': ['console',], - 'level': LOGLEVEL, - } - } -} +##Remove first comment(#) on each line to implement this working logging example. +#from os import environ +# +## Set LOGLEVEL in netbox.env or docker-compose.overide.yml to override a logging level of INFO. +#LOGLEVEL = environ.get('LOGLEVEL', 'INFO') +# +#LOGGING = { +# +# 'version': 1, +# 'disable_existing_loggers': False, +# 'formatters': { +# 'verbose': { +# 'format': '{levelname} {asctime} {module} {process:d} {thread:d} {message}', +# 'style': '{', +# }, +# 'simple': { +# 'format': '{levelname} {message}', +# 'style': '{', +# }, +# }, +# 'filters': { +# 'require_debug_false': { +# '()': 'django.utils.log.RequireDebugFalse', +# }, +# }, +# 'handlers': { +# 'console': { +# 'level': LOGLEVEL, +# 'filters': ['require_debug_false'], +# 'class': 'logging.StreamHandler', +# 'formatter': 'simple' +# }, +# 'mail_admins': { +# 'level': 'ERROR', +# 'class': 'django.utils.log.AdminEmailHandler', +# 'filters': ['require_debug_false'] +# } +# }, +# 'loggers': { +# 'django': { +# 'handlers': ['console'], +# 'propagate': True, +# }, +# 'django.request': { +# 'handlers': ['mail_admins'], +# 'level': 'ERROR', +# 'propagate': False, +# }, +# 'django_auth_ldap': { +# 'handlers': ['console',], +# 'level': LOGLEVEL, +# } +# } +#}