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

Commit 45d6c07

Browse files
committed
Use the new handler by default
1 parent 65a3755 commit 45d6c07

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

synapse/config/logger.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,17 @@
7171
# will be a delay for INFO/DEBUG logs to get written, but WARNING/ERROR
7272
# logs will still be flushed immediately.
7373
buffer:
74-
class: logging.handlers.MemoryHandler
74+
class: synapse.logging.handlers.PeriodicallyFlushingMemoryHandler
7575
target: file
7676
# The capacity is the number of log lines that are buffered before
7777
# being written to disk. Increasing this will lead to better
7878
# performance, at the expensive of it taking longer for log lines to
7979
# be written to disk.
8080
capacity: 10
8181
flushLevel: 30 # Flush for WARNING logs as well
82+
# The period of time, in seconds, between forced flushes.
83+
# Messages will not be delayed for longer than this time.
84+
period: 5
8285
8386
# A handler that writes logs to stderr. Unused by default, but can be used
8487
# instead of "buffer" and "file" in the logger handlers.

0 commit comments

Comments
 (0)