mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-29 06:46:09 -05:00
Add an example log_config file
This commit is contained in:
parent
d7457c7661
commit
5aae844e60
48
contrib/example_log_config.yaml
Normal file
48
contrib/example_log_config.yaml
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
# Example log_config file for synapse. To enable, point `log_config` to it in
|
||||||
|
# `homeserver.yaml`, and restart synapse.
|
||||||
|
#
|
||||||
|
# This configuration will produce similar results to the defaults within
|
||||||
|
# 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.util.logcontext.LoggingContextFilter
|
||||||
|
request: ""
|
||||||
|
|
||||||
|
handlers:
|
||||||
|
# example output to console
|
||||||
|
console:
|
||||||
|
class: logging.StreamHandler
|
||||||
|
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]
|
||||||
|
|
||||||
|
|
||||||
|
root:
|
||||||
|
level: INFO
|
||||||
|
handlers: [console] # to use file handler instead, switch to [file]
|
||||||
|
|
||||||
|
loggers:
|
||||||
|
synapse:
|
||||||
|
level: INFO
|
||||||
|
|
||||||
|
synapse.storage:
|
||||||
|
level: INFO
|
||||||
|
|
||||||
|
# example of enabling debugging for a component:
|
||||||
|
#
|
||||||
|
# synapse.federation.transport.server:
|
||||||
|
# level: DEBUG
|
Loading…
Reference in New Issue
Block a user