feat: add log/log4rs
This commit is contained in:
28
__log/log4rs/log4rs.yml
Normal file
28
__log/log4rs/log4rs.yml
Normal 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
|
||||
Reference in New Issue
Block a user