From 8cf9142791bebc109d7d2014acad393bec5be09e Mon Sep 17 00:00:00 2001 From: JerrySentry Date: Tue, 19 Nov 2024 14:42:51 -0500 Subject: [PATCH] clean up gunicorn.conf.py --- gunicorn.conf.py | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/gunicorn.conf.py b/gunicorn.conf.py index 2eb10a4052..41f7ddf023 100644 --- a/gunicorn.conf.py +++ b/gunicorn.conf.py @@ -1,7 +1,5 @@ -import logging import os -from gunicorn.glogging import Logger from prometheus_client import multiprocess @@ -10,34 +8,4 @@ def child_exit(server, worker): multiprocess.mark_process_dead(worker.pid) -class CustomGunicornLogger(Logger): - def setup(self, cfg): - super().setup(cfg) - custom_format = "[%(levelname)s] %(message)s [%(process)d] [%(asctime)s]" - date_format = "%Y-%m-%d %H:%M:%S %z" - formatter = logging.Formatter(fmt=custom_format, datefmt=date_format) - - # Update handlers with the custom formatter - for handler in self.error_log.handlers: - handler.setFormatter(formatter) - for handler in self.access_log.handlers: - handler.setFormatter(formatter) - - -logconfig_dict = { - "loggers": { - "gunicorn.error": { - "level": "INFO", - "handlers": ["console"], - "propagate": False, - }, - "gunicorn.access": { - "level": "INFO", - "handlers": ["console"], - "propagate": False, - }, - } -} - -# Update Gunicorn's `logger_class` to use the custom logger -logger_class = CustomGunicornLogger +loglevel = "info"