From 1a82685dd84edaffb4cf7785ff5fddddf8b92c12 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 25 Jun 2021 18:19:29 +0200 Subject: [PATCH] Don't reset log caching uvicorn will "load from dict" the config - which flushes the logs and therefore cleans log-buffering --- freqtrade/rpc/api_server/webserver.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/freqtrade/rpc/api_server/webserver.py b/freqtrade/rpc/api_server/webserver.py index 8a5c958e9..a43d4abe6 100644 --- a/freqtrade/rpc/api_server/webserver.py +++ b/freqtrade/rpc/api_server/webserver.py @@ -115,14 +115,12 @@ class ApiServer(RPCHandler): logger.info('Starting Local Rest Server.') verbosity = self._config['api_server'].get('verbosity', 'error') - log_config = uvicorn.config.LOGGING_CONFIG - # Change logging of access logs to stderr - log_config["handlers"]["access"]["stream"] = log_config["handlers"]["default"]["stream"] + uvconfig = uvicorn.Config(self.app, port=rest_port, host=rest_ip, use_colors=False, - log_config=log_config, + log_config=None, access_log=True if verbosity != 'error' else False, ) try: