From f4be9167f6a321ba7f2de4282b111b9cdbe844f2 Mon Sep 17 00:00:00 2001 From: "Andrey N. Petrov" Date: Fri, 30 Mar 2018 18:43:51 +0300 Subject: [PATCH] Add debug logging for test. --- configuration/configuration.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/configuration/configuration.py b/configuration/configuration.py index 5eba733..ce52a85 100644 --- a/configuration/configuration.py +++ b/configuration/configuration.py @@ -99,7 +99,25 @@ ENFORCE_GLOBAL_UNIQUE = os.environ.get('ENFORCE_GLOBAL_UNIQUE', False) # Enable custom logging. Please see the Django documentation for detailed guidance on configuring custom logs: # https://docs.djangoproject.com/en/1.11/topics/logging/ -LOGGING = {} +# LOGGING = {} + +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'handlers': { + 'file': { + 'level': 'DEBUG', + 'class': 'logging.FileHandler', + 'filename': '/var/log/netbox.log', + }, + }, + 'loggers': { + 'django': { + 'handlers': ['file'], + 'level': 'DEBUG', + }, + }, +} # Setting this to True will permit only authenticated users to access any part of NetBox. By default, anonymous users # are permitted to access most data in NetBox (excluding secrets) but not make any changes.