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

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Aug 7, 2020
1 parent 07465f0 commit 5936b1a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
11 changes: 8 additions & 3 deletions docs/sample_log_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@ handlers:
filename: /var/log/matrix-synapse/homeserver.log
when: midnight
backupCount: 3 # Does not include the current log file.
filters: [context]
encoding: utf8

# Default to buffering writes to log file for efficiency. This means that
# will be a delay for WARNING/INFO/DEBUG logs to get written, but ERROR
# logs will still be flushed immediately.
buffer:
class: logging.handlers.MemoryHandler
formatter: precise
filters: [context]
target: file
capacity: 100

Expand All @@ -46,8 +45,14 @@ loggers:
# information such as access tokens.
level: INFO

twisted:
# We send the twisted logging directly to the file handler,
# to work around https://github.com/matrix-org/synapse/issues/3471
handlers: [file]
propagate: false

root:
level: INFO
handlers: [buffer, console]
handlers: [buffer]

disable_existing_loggers: false
11 changes: 8 additions & 3 deletions synapse/config/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,14 @@
filename: ${log_file}
when: midnight
backupCount: 3 # Does not include the current log file.
filters: [context]
encoding: utf8
# Default to buffering writes to log file for efficiency. This means that
# will be a delay for WARNING/INFO/DEBUG logs to get written, but ERROR
# logs will still be flushed immediately.
buffer:
class: logging.handlers.MemoryHandler
formatter: precise
filters: [context]
target: file
capacity: 100
Expand All @@ -90,9 +89,15 @@
# information such as access tokens.
level: INFO
twisted:
# We send the twisted logging directly to the file handler,
# to work around https://github.com/matrix-org/synapse/issues/3471
handlers: [file]
propagate: false
root:
level: INFO
handlers: [buffer, console]
handlers: [buffer]
disable_existing_loggers: false
"""
Expand Down

0 comments on commit 5936b1a

Please sign in to comment.