matrix: rebase config against upstream

This commit is contained in:
Markus 2021-11-29 16:14:47 +01:00
parent 4ac6936b54
commit f003f62989
2 changed files with 287 additions and 544 deletions

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,11 @@
# This is a YAML file containing a standard Python logging configuration # This is a YAML file containing a standard Python logging configuration
# dictionary. See [1] for details on the valid settings. # dictionary. See [1] for details on the valid settings.
# #
# Synapse also supports structured logging for machine readable logs which can
# be ingested by ELK stacks. See [2] for details.
#
# [1]: https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema # [1]: https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema
# [2]: https://matrix-org.github.io/synapse/latest/structured_logging.html
version: 1 version: 1
@ -20,18 +24,31 @@ handlers:
backupCount: 3 # Does not include the current log file. backupCount: 3 # Does not include the current log file.
encoding: utf8 encoding: utf8
# Default to buffering writes to log file for efficiency. This means that # Default to buffering writes to log file for efficiency.
# will be a delay for INFO/DEBUG logs to get written, but WARNING/ERROR # WARNING/ERROR logs will still be flushed immediately, but there will be a
# logs will still be flushed immediately. # delay (of up to `period` seconds, or until the buffer is full with
# `capacity` messages) before INFO/DEBUG logs get written.
buffer: buffer:
class: logging.handlers.MemoryHandler class: synapse.logging.handlers.PeriodicallyFlushingMemoryHandler
target: file target: file
# The capacity is the number of log lines that are buffered before
# being written to disk. Increasing this will lead to better # The capacity is the maximum 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 # performance, at the expensive of it taking longer for log lines to
# be written to disk. # be written to disk.
# This parameter is required.
capacity: 10 capacity: 10
flushLevel: 30 # Flush for WARNING logs as well
# Logs with a level at or above the flush level will cause the buffer to
# be flushed immediately.
# Default value: 40 (ERROR)
# Other values: 50 (CRITICAL), 30 (WARNING), 20 (INFO), 10 (DEBUG)
flushLevel: 30 # Flush immediately for WARNING logs and higher
# The period of time, in seconds, between forced flushes.
# Messages will not be delayed for longer than this time.
# Default value: 5 seconds
period: 5
# A handler that writes logs to stderr. Unused by default, but can be used # A handler that writes logs to stderr. Unused by default, but can be used
# instead of "buffer" and "file" in the logger handlers. # instead of "buffer" and "file" in the logger handlers.
@ -60,7 +77,7 @@ root:
# then write them to a file. # then write them to a file.
# #
# Replace "buffer" with "console" to log to stderr instead. (Note that you'll # Replace "buffer" with "console" to log to stderr instead. (Note that you'll
# also need to update the configuation for the `twisted` logger above, in # also need to update the configuration for the `twisted` logger above, in
# this case.) # this case.)
# #
handlers: [buffer] handlers: [buffer]