-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
39 lines (38 loc) · 1.01 KB
/
config.py
File metadata and controls
39 lines (38 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import colorlog
LOGGING_CONFIG = {
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"verbose": {
"()": colorlog.ColoredFormatter,
"format": "{log_color}{asctime} [{levelname:5}] {filename}:{lineno:<5}- {funcName:<15}: {message}",
"style": "{",
"log_colors": {
"DEBUG": "cyan",
"INFO": "green",
"WARNING": "yellow",
"ERROR": "red",
"CRITICAL": "red,bg_white",
},
},
},
"handlers": {
# Outputs to file
"file": {
"level": "ERROR",
"class": "logging.FileHandler",
"filename": "django.log",
},
# Output to console
"console": {
"level": "INFO",
"class": "logging.StreamHandler",
"formatter": "verbose",
},
},
"root": {
# Using console for now.
"handlers": ["console"],
"level": "DEBUG",
},
}