Skip to content

Commit

Permalink
feat: add support for log4rs.yml in launch_example.json
Browse files Browse the repository at this point in the history
  • Loading branch information
arloor committed Sep 6, 2024
1 parent eb22a25 commit 49d5a90
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .vscode/launch_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"name": "Debug",
"program": "${workspaceFolder}/target/debug/sslocal",
"args": [
"--log-config",
"log4rs.yml",
"--local-addr",
"0.0.0.0:2080",
"-k",
Expand Down
33 changes: 33 additions & 0 deletions log4rs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
refresh_rate: 30 seconds
appenders:
stdout:
kind: console
encoder:
pattern: "{d} {h({l}):<5} {m}{n}"
file:
kind: rolling_file
path: shadowsocks.log
encoder:
kind: pattern
pattern: "{d} {h({l}):<5} {m}{n}"
policy:
trigger:
kind: size
limit: 10 mb
roller:
kind: fixed_window
pattern: shadowsocks.{}.log
count: 5
root:
level: debug
appenders:
- stdout
- file
loggers:
app::backend::db:
level: info
app::requests:
level: info
appenders:
- file
additive: false

0 comments on commit 49d5a90

Please sign in to comment.