summary refs log tree commit diff
path: root/docs
diff options
context:
space:
mode:
authorreivilibre <38398653+reivilibre@users.noreply.github.com>2021-07-27 14:32:05 +0100
committerGitHub <noreply@github.com>2021-07-27 14:32:05 +0100
commite16eab29d671504144f4185d4738e5bfd7a3a2c6 (patch)
tree3f38f91b1d1a0b098eea51a33bc3248902d3385e /docs
parentUse new go test running syntax for complement. (#10488) (diff)
downloadsynapse-e16eab29d671504144f4185d4738e5bfd7a3a2c6.tar.xz
Add a PeriodicallyFlushingMemoryHandler to prevent logging silence (#10407)
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
Diffstat (limited to 'docs')
-rw-r--r--docs/sample_log_config.yaml5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/sample_log_config.yaml b/docs/sample_log_config.yaml
index 669e600081..b088c83405 100644
--- a/docs/sample_log_config.yaml
+++ b/docs/sample_log_config.yaml
@@ -28,7 +28,7 @@ handlers:
     # will be a delay for INFO/DEBUG logs to get written, but WARNING/ERROR
     # logs will still be flushed immediately.
     buffer:
-        class: logging.handlers.MemoryHandler
+        class: synapse.logging.handlers.PeriodicallyFlushingMemoryHandler
         target: file
         # The capacity is the number of log lines that are buffered before
         # being written to disk. Increasing this will lead to better
@@ -36,6 +36,9 @@ handlers:
         # be written to disk.
         capacity: 10
         flushLevel: 30  # Flush for WARNING logs as well
+        # The period of time, in seconds, between forced flushes.
+        # Messages will not be delayed for longer than this time.
+        period: 5
 
     # A handler that writes logs to stderr. Unused by default, but can be used
     # instead of "buffer" and "file" in the logger handlers.