added default_with_output_dir

This commit is contained in:
alex 2025-10-22 15:51:05 +08:00
parent cc5f7e57bc
commit b5d9ceb128

View File

@ -244,13 +244,23 @@ pub fn new_log<P: AsRef<Path>>(
guard guard
} }
pub fn default( pub fn default(
with_filename: bool, with_filename: bool,
with_line_number: bool, with_line_number: bool,
level: tracing::Level, 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 { ) -> tracing_appender::non_blocking::WorkerGuard {
new_log( new_log(
"./.output", output_dir,
7, 7,
PeriodGap::Daily, PeriodGap::Daily,
level, level,