feat: add log/log4rs

This commit is contained in:
2020-11-08 17:01:18 +08:00
parent b02111ecd5
commit 1b3cb499b4
5 changed files with 544 additions and 1 deletions

28
__log/log4rs/log4rs.yml Normal file
View File

@@ -0,0 +1,28 @@
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