Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix error when running synapse with no logfile #2581

Merged
merged 1 commit into from
Oct 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion synapse/config/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -176,6 +176,10 @@ def sighup(signum, stack):
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=""))
Expand Down