Don't reset log caching

uvicorn will "load from dict" the config - which flushes the logs
and therefore cleans log-buffering
This commit is contained in:
Matthias 2021-06-25 18:19:29 +02:00
parent ec2c4dd883
commit 1a82685dd8

View File

@ -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: