mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-05-30 15:42:25 +00:00
✨ Add file sink rotation and retention
This commit is contained in:
@@ -49,7 +49,10 @@ fn main {
|
||||
|
||||
if @lib.native_files_supported() {
|
||||
let file_logger = @lib.Logger::new(
|
||||
@lib.file_sink("bitlogger-example.log"),
|
||||
@lib.file_sink(
|
||||
"bitlogger-example.log",
|
||||
rotation=Some(@lib.file_rotation(128, max_backups=2)),
|
||||
),
|
||||
min_level=@lib.Level::Info,
|
||||
target="file",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user