Skip to content

Commit

Permalink
INFRA-2602: Add Timestamp to Logging Configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
dc3788 committed Nov 2, 2023
1 parent 406e94f commit 888f43f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ctlsettings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,18 @@ def common(**kwargs):
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'timestamped': {
'format': '{asctime} {levelname} {message}',
'style': '{'
},
},
'handlers': {
'file': {
'level': 'INFO',
'class': 'logging.FileHandler',
'filename': '/var/log/django/' + project + '.log',
'formatter': 'timestamped',
},
},
'loggers': {
Expand Down
7 changes: 7 additions & 0 deletions ctlsettings/staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,18 @@ def common(**kwargs):
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'timestamped': {
'format': '{asctime} {levelname} {message}',
'style': '{'
},
},
'handlers': {
'file': {
'level': 'INFO',
'class': 'logging.FileHandler',
'filename': '/var/log/django/' + project + '.log',
'formatter': 'timestamped',
},
},
'loggers': {
Expand Down

0 comments on commit 888f43f

Please sign in to comment.