This commit is contained in:
asxalex 2024-02-29 12:39:13 +08:00
parent 7027e88a19
commit 9ccbb32a41

View File

@ -213,6 +213,8 @@ pub fn new_log<P: AsRef<Path>>(
let roller = FileRoller::new(path, maxfile, period); let roller = FileRoller::new(path, maxfile, period);
let (writer, guard) = tracing_appender::non_blocking(roller); let (writer, guard) = tracing_appender::non_blocking(roller);
tracing_subscriber::fmt() tracing_subscriber::fmt()
.with_line_number(true)
.with_file(true)
.with_writer(writer) .with_writer(writer)
.with_max_level(level) .with_max_level(level)
.with_timer(timer) .with_timer(timer)