Lots more adjustments

This commit is contained in:
Francis Lavoie 2022-07-11 23:34:25 -04:00
parent d1d4ac7ef5
commit cfb8395744
No known key found for this signature in database
GPG key ID: E73DB3ECE64E7885
22 changed files with 210 additions and 78 deletions

View file

@ -131,9 +131,12 @@ As you saw above, messages are emitted by **loggers**. The messages are then sen
Caddy lets you [configure multiple logs](/docs/json/logging/logs/) which can process messages. A log consists of an encoder, writer, minimum level, sampling ratio, and a list of loggers to include or exclude. In Caddy, there is always a default log named `default`. You can customize it by specifying a log keyed as `"default"` in [this object](/docs/json/logging/logs/) in the config.
<aside class="tip">
Now would be a good time to <a href="/docs/json/logging/">explore Caddy's logging docs</a> so you can become familiar with the structure and parameters we're talking about.
Now would be a good time to [explore Caddy's logging docs](/docs/json/logging/) so you can become familiar with the structure and parameters we're talking about.
</aside>
- **Encoder:** The format for the log. Transforms the in-memory data representation into a byte slice. Encoders have access to all fields of a log message.
- **Writer:** The log output. Can be any log writer module, like to a file or network socket. It simply writes bytes.
- **Level:** Logs have various levels, from DEBUG to FATAL. Messages lower than the specified level will be ignored by the log.