|
| 1 | +=== :duct.logger/simple |
| 2 | + |
| 3 | +A simple buffered logger that adheres to the duct.logger/Logger protocol. |
| 4 | + |
| 5 | +Takes the following options: |
| 6 | + |
| 7 | +- `:appenders` - a collection of appender configurations |
| 8 | +- `:buffer-size` - the size of the logging ring buffer (default: 1024) |
| 9 | +- `:polling-rate` - the delay in ms between each poll (default: 5) |
| 10 | +- `:poll-chunk-size` - the max no. of logs to process each poll (default: 8) |
| 11 | +- `:shutdown-delay` - the delay in ms before shutting down (default: 100) |
| 12 | +- `:shutdown-timeout` - the time to wait in ms for shutdown (default: 1000) |
| 13 | +
|
| 14 | +Appender configurations are maps that have a `:type` option that can be one |
| 15 | +of: |
| 16 | + |
| 17 | +- `:file` - logs are appended to a file |
| 18 | +- `:stdout` - logs are sent to STDOUT |
| 19 | +
|
| 20 | +File appenders have the following options: |
| 21 | + |
| 22 | +- `:levels` - a set of log levels (or `:all`) to limit the appender to |
| 23 | +- `:brief?` - whether to omit timestamps and levels (defaults to false) |
| 24 | +
|
| 25 | +STDOUT appenders have the following options: |
| 26 | + |
| 27 | +- `:levels` - a set of log levels (or `:all`) to limit the appender to |
| 28 | +- `:path` - the path of the log file |
| 29 | +
|
| 30 | +=== :duct.module/logging |
| 31 | + |
| 32 | +A Duct module that adds logging to the configuration using the |
| 33 | +`:duct.logger/simple` component. Takes no options, but uses a different |
| 34 | +logging setup depending on the active profile: |
| 35 | + |
| 36 | +- `:main` - write all logs in full to STDOUT |
| 37 | +- `:repl` - write all logs to `logs/repl.log` and `:report` level logs to |
| 38 | + STDOUT in brief (no timestamp) |
| 39 | + |
| 40 | +- `:test` - write all logs to `logs/test.log` |
| 41 | + |
0 commit comments