Skip to content
Snippets Groups Projects
Commit c89e6aad authored by Richard van der Hoff's avatar Richard van der Hoff Committed by GitHub
Browse files

Merge pull request #2581 from matrix-org/rav/fix_init_with_no_logfile

Fix error when running synapse with no logfile
parents 1dd0f53b f7f90e0c
No related branches found
No related tags found
No related merge requests found
......@@ -148,8 +148,8 @@ def setup_logging(config, use_worker_options=False):
"%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s"
" - %(message)s"
)
if log_config is None:
if log_config is None:
level = logging.INFO
level_for_storage = logging.INFO
if config.verbosity:
......@@ -176,6 +176,10 @@ def setup_logging(config, use_worker_options=False):
logger.info("Opened new log file due to SIGHUP")
else:
handler = logging.StreamHandler()
def sighup(signum, stack):
pass
handler.setFormatter(formatter)
handler.addFilter(LoggingContextFilter(request=""))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment