Commit 09b71a90 authored by Haelwenn's avatar Haelwenn

Merge branch 'mr/exsyslogger-doc-and-format' into 'develop'

Adds a couple examples to docs/config.md for ExSyslogger and removes duplicate timestamps from default format.

See merge request !784
parents f7aedbcc ab80c8eb
Pipeline #7170 passed with stages
in 3 minutes and 42 seconds
......@@ -115,7 +115,7 @@ config :logger, :console,
config :logger, :ex_syslogger,
level: :debug,
ident: "Pleroma",
format: "$date $time $metadata[$level] $message",
format: "$metadata[$level] $message",
metadata: [:request_id]
config :mime, :types, %{
......
......@@ -100,6 +100,26 @@ config :pleroma, Pleroma.Mailer,
## :logger
* `backends`: `:console` is used to send logs to stdout, `{ExSyslogger, :ex_syslogger}` to log to syslog
An example to enable ONLY ExSyslogger (f/ex in ``prod.secret.exs``) with info and debug suppressed:
```
config :logger,
backends: [{ExSyslogger, :ex_syslogger}]
config :logger, :ex_syslogger,
level: :warn
```
Another example, keeping console output and adding the pid to syslog output:
```
config :logger,
backends: [:console, {ExSyslogger, :ex_syslogger}]
config :logger, :ex_syslogger,
level: :warn,
option: [:pid, :ndelay]
```
See: [logger’s documentation](https://hexdocs.pm/logger/Logger.html) and [ex_syslogger’s documentation](https://hexdocs.pm/ex_syslogger/)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment