tracing level
This commit is contained in:
parent
0078de5ffe
commit
5630f12e51
@ -8,7 +8,7 @@ fn do_log() {
|
||||
debug!("debug");
|
||||
}
|
||||
fn criterion_benchmark(c: &mut Criterion) {
|
||||
let _guard = default(false, false);
|
||||
let _guard = default(false, false, tracing::Level::DEBUG);
|
||||
c.bench_function("log", |b| b.iter(|| do_log()));
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,6 @@ use rolling_file::default;
|
||||
mod submod;
|
||||
|
||||
fn main() {
|
||||
let _guard = default(false, false);
|
||||
let _guard = default(false, false, tracing::Level::DEBUG);
|
||||
submod::do_record();
|
||||
}
|
||||
|
||||
@ -245,12 +245,13 @@ pub fn new_log<P: AsRef<Path>>(
|
||||
pub fn default(
|
||||
with_filename: bool,
|
||||
with_line_number: bool,
|
||||
level: tracing::Level,
|
||||
) -> tracing_appender::non_blocking::WorkerGuard {
|
||||
new_log(
|
||||
"./.output",
|
||||
7,
|
||||
PeriodGap::Daily,
|
||||
tracing::Level::DEBUG,
|
||||
level,
|
||||
with_filename,
|
||||
with_line_number,
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user