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

Commit f4ac934

Browse files
authored
Revert use of PeriodicallyFlushingMemoryHandler by default (#10515)
1 parent a7baccc commit f4ac934

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

changelog.d/10515.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add a buffered logging handler which periodically flushes itself.

docs/sample_log_config.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,14 @@ handlers:
2828
# will be a delay for INFO/DEBUG logs to get written, but WARNING/ERROR
2929
# logs will still be flushed immediately.
3030
buffer:
31-
class: synapse.logging.handlers.PeriodicallyFlushingMemoryHandler
31+
class: logging.handlers.MemoryHandler
3232
target: file
3333
# The capacity is the number of log lines that are buffered before
3434
# being written to disk. Increasing this will lead to better
3535
# performance, at the expensive of it taking longer for log lines to
3636
# be written to disk.
3737
capacity: 10
3838
flushLevel: 30 # Flush for WARNING logs as well
39-
# The period of time, in seconds, between forced flushes.
40-
# Messages will not be delayed for longer than this time.
41-
period: 5
4239

4340
# A handler that writes logs to stderr. Unused by default, but can be used
4441
# instead of "buffer" and "file" in the logger handlers.

synapse/config/logger.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,14 @@
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: synapse.logging.handlers.PeriodicallyFlushingMemoryHandler
74+
class: logging.handlers.MemoryHandler
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
8582
8683
# A handler that writes logs to stderr. Unused by default, but can be used
8784
# instead of "buffer" and "file" in the logger handlers.

0 commit comments

Comments
 (0)