Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Commit

Permalink
chore: add django-db-logger settings
Browse files Browse the repository at this point in the history
  • Loading branch information
crsepulveda committed May 14, 2020
1 parent 7b46e5a commit d3888a6
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,18 @@ def get_local_value(key, default_value):

# required apps
'base.apps.BaseConfig',
'users',
'users.apps.UsersConfig',

# external
'captcha',
'loginas',
'rest_framework',
'webpack_loader',
'django_db_logger',

# internal
'regions',
'parameters',
'regions.apps.RegionsConfig',
'parameters.apps.ParametersConfig',
]

# Email settings, uncomment if your project sends emails
Expand Down Expand Up @@ -325,10 +326,14 @@ def get_local_value(key, default_value):
'formatter': 'standard',
'level': 'ERROR',
},
'db_log': {
'level': 'DEBUG',
'class': 'django_db_logger.db_log_handler.DatabaseLogHandler'
},
},
'loggers': {
'django.request': {
'handlers': ['mail_admins', 'file'],
'handlers': ['mail_admins', 'file', 'db_log'],
'level': 'ERROR',
'propagate': True,
},
Expand Down

0 comments on commit d3888a6

Please sign in to comment.