Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logging configuration #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions eshcIntranet/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,37 @@ def wiki_restrict_access(article, user):
WIKI_CAN_READ = wiki_restrict_access
WIKI_CAN_WRITE = wiki_restrict_access

LOGGING = {
"version": 1, # the dictConfig format version
"disable_existing_loggers": False, # retain the default loggers,
"formatters": {
"verbose": {
"format": "{name} {levelname} {asctime} {module} {process:d} {thread:d} {message}",
"style": "{",
},
"simple": {
"format": "{levelname} {message}",
"style": "{",
},
},
"handlers": {
"file_debug": {
"class": "logging.handlers.RotatingFileHandler",
"filename": "debug.log",
"level": "DEBUG",
'formatter': 'verbose',
"maxBytes": 1024 * 1024 * 10, # 10 MB
"backupCount": 5,
},
},
"loggers": {
"": {
"handlers": ["file_debug"],
"level": "DEBUG"
},
}
}

# Email
# EMAIL_USE_TLS = True
# EMAIL_HOST = 'smtp.gmail.com'
Expand Down