0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-16 19:13:52 +01:00
synapse/contrib/example_log_config.yaml

52 lines
1.3 KiB
YAML
Raw Normal View History

# Example log_config file for synapse. To enable, point `log_config` to it in
2017-02-17 13:48:53 +01:00
# `homeserver.yaml`, and restart synapse.
#
# This configuration will produce similar results to the defaults within
2017-02-17 13:48:53 +01:00
# synapse, but can be edited to give more flexibility.
version: 1
formatters:
fmt:
format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s- %(message)s'
filters:
context:
(): synapse.logging.context.LoggingContextFilter
2017-02-17 13:48:53 +01:00
request: ""
handlers:
# example output to console
console:
class: logging.StreamHandler
2019-03-07 15:12:10 +01:00
formatter: fmt
2017-02-17 13:48:53 +01:00
filters: [context]
# example output to file - to enable, edit 'root' config below.
file:
class: logging.handlers.RotatingFileHandler
formatter: fmt
filename: /var/log/synapse/homeserver.log
maxBytes: 100000000
backupCount: 3
filters: [context]
2019-03-07 15:12:10 +01:00
encoding: utf8
2017-02-17 13:48:53 +01:00
root:
level: INFO
handlers: [console] # to use file handler instead, switch to [file]
2017-02-17 13:48:53 +01:00
loggers:
synapse:
level: INFO
synapse.storage.SQL:
# beware: increasing this to DEBUG will make synapse log sensitive
# information such as access tokens.
2017-02-17 13:48:53 +01:00
level: INFO
2017-02-17 13:48:53 +01:00
# example of enabling debugging for a component:
#
# synapse.federation.transport.server:
# level: DEBUG