Skip to content

Commit

Permalink
Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsierro committed Oct 16, 2024
1 parent 70ae54d commit 463ae8f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions fabman/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,26 @@
DBBACKUP_STORAGE_OPTIONS = {'location': 'backup/'}


if production:
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'file': {
'level': 'ERROR',
'class': 'logging.FileHandler',
'filename': 'error.log',
},
},
'loggers': {
'django': {
'handlers': ['file'],
'level': 'ERROR',
'propagate': True,
},
},
}

# Get email configuration from environment variables
EMAIL_HOST = os.environ.get('EMAIL_HOST')
EMAIL_PORT = os.environ.get('EMAIL_PORT')
Expand Down

0 comments on commit 463ae8f

Please sign in to comment.