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