Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
roomlist
Commits
66905236
Commit
66905236
authored
Oct 20, 2016
by
Daniel W Bond
Browse files
logging configured for deployment-- write to a file on 'warning', email on 'error'
parent
ba20a50a
Changes
1
Hide whitespace changes
Inline
Side-by-side
roomlist/settings/production.py
View file @
66905236
...
...
@@ -66,10 +66,12 @@ EMAIL_USE_SSL = False
LOGGING
=
{
'version'
:
1
,
# the ones the print everything out to the terminal
# and the ones that email on SuspiciousOperation occurrences
'disable_existing_loggers'
:
False
,
'handlers'
:
{
'file'
:
{
'level'
:
'
DEBU
G'
,
# will log all errors
'level'
:
'
WARNIN
G'
,
# will log all errors
'class'
:
'logging.FileHandler'
,
# make sure to change this to the proper path, and one that
# can be written to
...
...
@@ -84,11 +86,16 @@ LOGGING = {
'include_html'
:
True
,
},
},
# logs request errors
'loggers'
:
{
# logs request errors
# 5XX responses are raised as ERROR messages
# 4XX responses are raised as WARNING messages
'django.request'
:
{
'handlers'
:
[
'file'
],
'level'
:
'DEBUG'
,
'handlers'
:
[
'file'
,
'mail_admins'
],
'propagate'
:
True
,
},
'django.template'
:
{
'handlers'
:
[
'file'
,],
'propagate'
:
True
,
},
# django's default loggers send request and security messages at the ERROR
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment