forked from estk/log4rs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add trigger kind "time" in rolling_file (estk#296)
* feat(triger): Add "time" triger * feat(trigger): use pre_process for time trigger * test(time): add test case of time trigger. * feat(triger): Add "time" triger like log4j * Update docs/Configuration.md Co-authored-by: Bryan Conn <30739012+bconn98@users.noreply.github.com> * Update src/append/rolling_file/policy/compound/trigger/time.rs Co-authored-by: Bryan Conn <30739012+bconn98@users.noreply.github.com> * Update src/append/rolling_file/policy/compound/trigger/time.rs Co-authored-by: Bryan Conn <30739012+bconn98@users.noreply.github.com> * Update src/append/rolling_file/policy/compound/trigger/time.rs Co-authored-by: Bryan Conn <30739012+bconn98@users.noreply.github.com> * Update src/append/rolling_file/policy/compound/trigger/time.rs Co-authored-by: Bryan Conn <30739012+bconn98@users.noreply.github.com> * fix nix Co-authored-by: Bryan Conn <30739012+bconn98@users.noreply.github.com> * Update Configuration.md and time.rs Co-authored-by: Bryan Conn <30739012+bconn98@users.noreply.github.com> --------- Co-authored-by: Bryan Conn <30739012+bconn98@users.noreply.github.com>
- Loading branch information
Showing
12 changed files
with
663 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,33 @@ | ||
appenders: | ||
stdout: | ||
kind: console | ||
encoder: | ||
pattern: "{d(%+)(utc)} [{f}:{L}] {h({l})} {M}:{m}{n}" | ||
filters: | ||
- kind: threshold | ||
level: info | ||
stdout: | ||
kind: console | ||
encoder: | ||
pattern: "{d(%+)(utc)} [{f}:{L}] {h({l})} {M}:{m}{n}" | ||
filters: | ||
- kind: threshold | ||
level: info | ||
file: | ||
kind: file | ||
path: "log/file.log" | ||
encoder: | ||
pattern: "[{d(%Y-%m-%dT%H:%M:%S%.6f)} {h({l}):<5.5} {M}] {m}{n}" | ||
rollingfile: | ||
kind: rolling_file | ||
path: "log/rolling_file.log" | ||
encoder: | ||
pattern: "[{d(%Y-%m-%dT%H:%M:%S%.6f)} {h({l}):<5.5} {M}] {m}{n}" | ||
policy: | ||
trigger: | ||
kind: time | ||
interval: 1 minute | ||
roller: | ||
kind: fixed_window | ||
pattern: "log/old-rolling_file-{}.log" | ||
base: 0 | ||
count: 2 | ||
root: | ||
level: info | ||
appenders: | ||
- stdout | ||
level: info | ||
appenders: | ||
- stdout | ||
- file | ||
- rollingfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.