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

Commit f03c877

Browse files
committed
sample log config
TODO: automate generation of this
1 parent b2db382 commit f03c877

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

docs/sample_log_config.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Example log config file for synapse.
2+
#
3+
# This is a YAML file containing a standard Python logging configuration
4+
# dictionary. See [1] for details on the valid settings.
5+
#
6+
# [1]: https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema
7+
8+
version: 1
9+
10+
formatters:
11+
precise:
12+
format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s'
13+
14+
filters:
15+
context:
16+
(): synapse.logging.context.LoggingContextFilter
17+
request: ""
18+
19+
handlers:
20+
file:
21+
class: logging.handlers.RotatingFileHandler
22+
formatter: precise
23+
filename: /home/rav/work/synapse/homeserver.log
24+
maxBytes: 104857600
25+
backupCount: 10
26+
filters: [context]
27+
encoding: utf8
28+
console:
29+
class: logging.StreamHandler
30+
formatter: precise
31+
filters: [context]
32+
33+
loggers:
34+
synapse.storage.SQL:
35+
# beware: increasing this to DEBUG will make synapse log sensitive
36+
# information such as access tokens.
37+
level: INFO
38+
39+
root:
40+
level: INFO
41+
handlers: [file, console]
42+
43+
disable_existing_loggers: false

0 commit comments

Comments
 (0)