commented out the logging

This commit is contained in:
ryanmerolle 2021-04-23 22:38:38 -04:00
parent 69dd87689c
commit 45889c3811

View File

@ -1,53 +1,54 @@
from os import environ ##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') ## Set LOGLEVEL in netbox.env or docker-compose.overide.yml to override a logging level of INFO.
#LOGLEVEL = environ.get('LOGLEVEL', 'INFO')
LOGGING = { #
#LOGGING = {
'version': 1, #
'disable_existing_loggers': False, # 'version': 1,
'formatters': { # 'disable_existing_loggers': False,
'verbose': { # 'formatters': {
'format': '{levelname} {asctime} {module} {process:d} {thread:d} {message}', # 'verbose': {
'style': '{', # 'format': '{levelname} {asctime} {module} {process:d} {thread:d} {message}',
}, # 'style': '{',
'simple': { # },
'format': '{levelname} {message}', # 'simple': {
'style': '{', # 'format': '{levelname} {message}',
}, # 'style': '{',
}, # },
'filters': { # },
'require_debug_false': { # 'filters': {
'()': 'django.utils.log.RequireDebugFalse', # 'require_debug_false': {
}, # '()': 'django.utils.log.RequireDebugFalse',
}, # },
'handlers': { # },
'console': { # 'handlers': {
'level': LOGLEVEL, # 'console': {
'filters': ['require_debug_false'], # 'level': LOGLEVEL,
'class': 'logging.StreamHandler', # 'filters': ['require_debug_false'],
'formatter': 'simple' # 'class': 'logging.StreamHandler',
}, # 'formatter': 'simple'
'mail_admins': { # },
'level': 'ERROR', # 'mail_admins': {
'class': 'django.utils.log.AdminEmailHandler', # 'level': 'ERROR',
'filters': ['require_debug_false'] # 'class': 'django.utils.log.AdminEmailHandler',
} # 'filters': ['require_debug_false']
}, # }
'loggers': { # },
'django': { # 'loggers': {
'handlers': ['console'], # 'django': {
'propagate': True, # 'handlers': ['console'],
}, # 'propagate': True,
'django.request': { # },
'handlers': ['mail_admins'], # 'django.request': {
'level': 'ERROR', # 'handlers': ['mail_admins'],
'propagate': False, # 'level': 'ERROR',
}, # 'propagate': False,
'django_auth_ldap': { # },
'handlers': ['console',], # 'django_auth_ldap': {
'level': LOGLEVEL, # 'handlers': ['console',],
} # 'level': LOGLEVEL,
} # }
} # }
#}