Files
simple-rust-tests/__log/log4rs/log4rs.yml
2020-11-08 17:01:18 +08:00

28 lines
689 B
YAML

appenders:
# An appender named "stdout" that writes to stdout
stdout:
kind: console
encoder:
pattern: "[Console] {d} - {l} -{t} - {m}{n}"
# An appender named "file" that writes to a file with a custom pattern encoder
file:
kind: file
path: "log/test.log"
encoder:
pattern: "[File] {d} - {l} - {t} - {m}{n}"
# Set the default logging level to "warn" and attach the "stdout" appender to the root
root:
level: info
appenders:
- stdout
loggers:
# Route log events sent to the "app" logger to the "file" appender,
# and *not* the normal appenders installed at the root
app:
level: info
appenders:
- file
additive: false