-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add log rotation #6564
Add log rotation #6564
Changes from 1 commit
c2e922b
d5f0046
50abd62
b96dad4
896d291
7a5b29b
91e0056
57cca14
c4fae35
5417943
baec590
e5f2b22
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,7 +42,8 @@ pub struct LogRotationOpt { | |
| #[structopt(long, parse(from_os_str))] | ||
| log_directory: Option<PathBuf>, | ||
|
|
||
| /// Rotate the log file when it has become older than the specified age. | ||
| /// Rotate the log file when the local clock has started a new day/hour/minute/second | ||
| /// since the current file has been created. | ||
| #[structopt(long, | ||
| conflicts_with("log-size"), | ||
| possible_values(&["day", "hour", "minute", "second"]), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So you'd for example pass
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it's inspired by the Age enum from flexi_logger :) I could remove minute / second or even rename them if you think we could use a better name ! :)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The documentation of the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 5417943 :) |
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.