Skip to content

Commit

Permalink
log to stdout in production and staging
Browse files Browse the repository at this point in the history
  • Loading branch information
David Wilby committed Oct 5, 2021
1 parent f557e78 commit ae6edc7
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
28 changes: 28 additions & 0 deletions annotation_tool/settings/production.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import logging
import sys
from .base import *

# Enable csrf in production
Expand All @@ -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,
},
},
}
25 changes: 25 additions & 0 deletions annotation_tool/settings/staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
}

0 comments on commit ae6edc7

Please sign in to comment.