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

Commit

Permalink
Revert use of PeriodicallyFlushingMemoryHandler by default (#10515)
Browse files Browse the repository at this point in the history
  • Loading branch information
reivilibre committed Aug 3, 2021
1 parent a7baccc commit f4ac934
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
1 change: 1 addition & 0 deletions changelog.d/10515.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a buffered logging handler which periodically flushes itself.
5 changes: 1 addition & 4 deletions docs/sample_log_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,14 @@ handlers:
# will be a delay for INFO/DEBUG logs to get written, but WARNING/ERROR
# logs will still be flushed immediately.
buffer:
class: synapse.logging.handlers.PeriodicallyFlushingMemoryHandler
class: logging.handlers.MemoryHandler
target: file
# The capacity is the number of log lines that are buffered before
# being written to disk. Increasing this will lead to better
# performance, at the expensive of it taking longer for log lines to
# 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.
Expand Down
5 changes: 1 addition & 4 deletions synapse/config/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,14 @@
# will be a delay for INFO/DEBUG logs to get written, but WARNING/ERROR
# logs will still be flushed immediately.
buffer:
class: synapse.logging.handlers.PeriodicallyFlushingMemoryHandler
class: logging.handlers.MemoryHandler
target: file
# The capacity is the number of log lines that are buffered before
# being written to disk. Increasing this will lead to better
# performance, at the expensive of it taking longer for log lines to
# 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.
Expand Down

0 comments on commit f4ac934

Please sign in to comment.