Browse Source

Add logging config to production.py

pull/2003/head
Hironsan 2 years ago
parent
commit
a5f865c4cb
1 changed files with 28 additions and 0 deletions
  1. 28
      backend/config/settings/production.py

28
backend/config/settings/production.py

@ -1,3 +1,31 @@
from .base import * # noqa: F401,F403 from .base import * # noqa: F401,F403
DEBUG = False DEBUG = False
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"standard": {
"format": "[%(asctime)s] [%(process)d] [%(levelname)s] [%(name)s::%(funcName)s::%(lineno)d] %(message)s",
"datefmt": "%Y-%m-%d %H:%M:%S %z",
}
},
"handlers": {
"console": {
"level": "INFO",
"class": "logging.StreamHandler",
"formatter": "standard",
},
},
"root": {
"handlers": ["console"],
"level": "INFO",
},
"loggers": {
"django": {
"handlers": ["console"],
"level": "INFO",
},
},
}
Loading…
Cancel
Save