added default_with_output_dir
This commit is contained in:
parent
cc5f7e57bc
commit
b5d9ceb128
12
src/lib.rs
12
src/lib.rs
@ -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,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user