diff --git a/annotation_tool/settings/production.py b/annotation_tool/settings/production.py index 7d02fc70..497c96c6 100644 --- a/annotation_tool/settings/production.py +++ b/annotation_tool/settings/production.py @@ -1,3 +1,5 @@ +import logging +import sys from .base import * # Enable csrf in production @@ -6,3 +8,29 @@ ) ALLOWED_HOSTS.append('annotate.gate.ac.uk') + + +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'formatters': { + 'verbose': { + 'format': '%(asctime)s %(name)-12s %(levelname)-8s %(message)s', + }, + }, + 'handlers': { + 'console': { + 'level': 'INFO', + 'class': 'logging.StreamHandler', + 'stream': sys.stdout, + 'formatter': 'verbose' + }, + }, + 'loggers': { + '': { + 'handlers': ['console'], + 'level': 'INFO', + 'propagate': True, + }, + }, +} \ No newline at end of file diff --git a/annotation_tool/settings/staging.py b/annotation_tool/settings/staging.py index f445008a..fd12fd10 100644 --- a/annotation_tool/settings/staging.py +++ b/annotation_tool/settings/staging.py @@ -6,3 +6,28 @@ ) ALLOWED_HOSTS.append('annotate-test.gate.ac.uk') + +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'formatters': { + 'verbose': { + 'format': '%(asctime)s %(name)-12s %(levelname)-8s %(message)s', + }, + }, + 'handlers': { + 'console': { + 'level': 'INFO', + 'class': 'logging.StreamHandler', + 'stream': sys.stdout, + 'formatter': 'verbose' + }, + }, + 'loggers': { + '': { + 'handlers': ['console'], + 'level': 'INFO', + 'propagate': True, + }, + }, +} \ No newline at end of file