Commit 75f314a2 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Simplify logger replacement

parent a2f8ac2b
Pipeline #37177 passed with stages
in 1 minute and 9 seconds
......@@ -19,7 +19,6 @@ from os import environ
from flasgger import Swagger
from flask import send_from_directory, redirect
from flask.logging import default_handler
from flask_restful import Api
from import_api_app.app import app
......@@ -40,9 +39,7 @@ environ['HELM_EXPERIMENTAL_OCI'] = '1'
# If app is started via gunicorn
if __name__ != '__main__':
gunicorn_logger = logging.getLogger('gunicorn.error')
app.logger.handlers = gunicorn_logger.handlers
app.logger.setLevel(gunicorn_logger.level)
app.logger.removeHandler(default_handler)
app.logger = gunicorn_logger
app.logger.info('Starting production server')
api = Api(app)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment