From a5f865c4cb9f94bd823024b34a26ab5d2881f5fa Mon Sep 17 00:00:00 2001 From: Hironsan Date: Fri, 16 Sep 2022 15:30:33 +0900 Subject: [PATCH] Add logging config to production.py --- backend/config/settings/production.py | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/backend/config/settings/production.py b/backend/config/settings/production.py index 255a475e..84a6eefa 100644 --- a/backend/config/settings/production.py +++ b/backend/config/settings/production.py @@ -1,3 +1,31 @@ from .base import * # noqa: F401,F403 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", + }, + }, +}