We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c79a670 commit d661dcbCopy full SHA for d661dcb
settings.py
@@ -13,6 +13,7 @@
13
https://docs.djangoproject.com/en/3.2/ref/settings/
14
"""
15
16
+import json
17
import os
18
from pathlib import Path
19
@@ -56,3 +57,32 @@
56
57
# https://docs.djangoproject.com/en/3.2/topics/http/sessions/
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
+}
0 commit comments