File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 13
13
https://docs.djangoproject.com/en/3.2/ref/settings/
14
14
"""
15
15
16
+ import json
16
17
import os
17
18
from pathlib import Path
18
19
56
57
# https://docs.djangoproject.com/en/3.2/topics/http/sessions/
57
58
58
59
SESSION_ENGINE = "api.models.session"
60
+
61
+
62
+ LOGGING = {
63
+ "version" : 1 ,
64
+ "disable_existing_loggers" : False ,
65
+ "formatters" : {
66
+ "default" : {
67
+ "format" : json .dumps (
68
+ {
69
+ "name" : "%(name)s" ,
70
+ "level" : "%(levelname)s" ,
71
+ "message" : "%(message)s" ,
72
+ },
73
+ separators = ("," , ":" ),
74
+ ),
75
+ "style" : "%" ,
76
+ },
77
+ },
78
+ "handlers" : {
79
+ "console" : {
80
+ "class" : "logging.StreamHandler" ,
81
+ "formatter" : "default" ,
82
+ },
83
+ },
84
+ "root" : {
85
+ "level" : os .getenv ("LOG_LEVEL" , "INFO" ),
86
+ "handlers" : ["console" ],
87
+ },
88
+ }
You can’t perform that action at this time.
0 commit comments