mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 16:53:53 +01:00
Merge pull request #2581 from matrix-org/rav/fix_init_with_no_logfile
Fix error when running synapse with no logfile
This commit is contained in:
commit
c89e6aadff
1 changed files with 5 additions and 1 deletions
|
@ -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=""))
|
||||
|
|
Loading…
Reference in a new issue