Add synapse role
For all the hipster kids.
This commit is contained in:
parent
74cb31e243
commit
e101493889
6 changed files with 201 additions and 0 deletions
37
roles/synapse/templates/log.config.j2
Normal file
37
roles/synapse/templates/log.config.j2
Normal file
|
@ -0,0 +1,37 @@
|
|||
# [2]: https://matrix-org.github.io/synapse/latest/structured_logging.html
|
||||
|
||||
version: 1
|
||||
formatters:
|
||||
precise:
|
||||
format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s'
|
||||
|
||||
handlers:
|
||||
file:
|
||||
class: logging.handlers.TimedRotatingFileHandler
|
||||
formatter: precise
|
||||
filename: /var/lib/synapse/{{ password.server_name }}.log
|
||||
when: midnight
|
||||
backupCount: 3 # Does not include the current log file.
|
||||
encoding: utf8
|
||||
|
||||
buffer:
|
||||
class: synapse.logging.handlers.PeriodicallyFlushingMemoryHandler
|
||||
target: file
|
||||
|
||||
capacity: 10
|
||||
flushLevel: 30 # Flush immediately for WARNING logs and higher
|
||||
period: 5
|
||||
|
||||
console:
|
||||
class: logging.StreamHandler
|
||||
formatter: precise
|
||||
|
||||
loggers:
|
||||
synapse.storage.SQL:
|
||||
level: INFO
|
||||
|
||||
root:
|
||||
level: INFO
|
||||
handlers: [buffer]
|
||||
|
||||
disable_existing_loggers: false
|
Loading…
Add table
Add a link
Reference in a new issue