From b5d9ceb128f70d840f8b7f14334e588d4d1712f4 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 22 Oct 2025 15:51:05 +0800 Subject: [PATCH] added default_with_output_dir --- src/lib.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index ce01eb1..66bf1b3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -244,13 +244,23 @@ pub fn new_log>( guard } + pub fn default( with_filename: bool, with_line_number: bool, level: tracing::Level, +) -> tracing_appender::non_blocking::WorkerGuard { + default_with_output_dir("./.output", with_filename, with_line_number, level) +} + +pub fn default_with_output_dir( + output_dir: &str, + with_filename: bool, + with_line_number: bool, + level: tracing::Level, ) -> tracing_appender::non_blocking::WorkerGuard { new_log( - "./.output", + output_dir, 7, PeriodGap::Daily, level,