mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-26 11:36:03 +03:00
45278eaa19
The added logger configuration (--log-config or log_config:) uses systemd's python bindings to pass messages directly to the journal. Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
23 lines
502 B
YAML
23 lines
502 B
YAML
version: 1
|
|
|
|
# In systemd's journal, loglevel is implicitly stored, so let's omit it
|
|
# from the message text.
|
|
formatters:
|
|
journal_fmt:
|
|
format: '%(name)s: [%(request)s] %(message)s'
|
|
|
|
filters:
|
|
context:
|
|
(): synapse.util.logcontext.LoggingContextFilter
|
|
request: ""
|
|
|
|
handlers:
|
|
journal:
|
|
class: systemd.journal.JournalHandler
|
|
formatter: journal_fmt
|
|
filters: [context]
|
|
SYSLOG_IDENTIFIER: synapse
|
|
|
|
root:
|
|
level: INFO
|
|
handlers: [journal]
|