summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-06-21 11:41:25 +0100
committerGitHub <noreply@github.com>2021-06-21 11:41:25 +0100
commit107c06081f46b0cda2128265bdae5f4280b1645f (patch)
treee588bdeb842beba539ccc902ae1b128f0d2f420f /synapse/config
parentDeploy a documentation version for each new Synapse release (#10198) (diff)
downloadsynapse-107c06081f46b0cda2128265bdae5f4280b1645f.tar.xz
Ensure that errors during startup are written to the logs and the console. (#10191)
* Defer stdio redirection until we are about to start the reactor

* Catch and handle exceptions during startup
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/logger.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/synapse/config/logger.py b/synapse/config/logger.py
index 813076dfe2..91d9bcf32e 100644
--- a/synapse/config/logger.py
+++ b/synapse/config/logger.py
@@ -259,9 +259,7 @@ def _setup_stdlib_logging(config, log_config_path, logBeginner: LogBeginner) ->
         finally:
             threadlocal.active = False
 
-    logBeginner.beginLoggingTo([_log], redirectStandardIO=not config.no_redirect_stdio)
-    if not config.no_redirect_stdio:
-        print("Redirected stdout/stderr to logs")
+    logBeginner.beginLoggingTo([_log], redirectStandardIO=False)
 
 
 def _load_logging_config(log_config_path: str) -> None: