提交 73ac5f89 编写于 作者: B Bartek Iwańczuk 提交者: Ryan Dahl

add module and line no for Rust logger (#2409)

上级 62c377fc
......@@ -64,7 +64,14 @@ impl log::Log for Logger {
fn log(&self, record: &Record) {
if self.enabled(record.metadata()) {
println!("{} RS - {}", record.level(), record.args());
let mut target = record.target().to_string();
if let Some(line_no) = record.line() {
target.push_str(":");
target.push_str(&line_no.to_string());
}
println!("{} RS - {} - {}", record.level(), target, record.args());
}
}
fn flush(&self) {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册