mirror of
https://github.com/denoland/deno.git
synced 2024-11-28 16:20:57 -05:00
add module and line no for Rust logger (#2409)
This commit is contained in:
parent
62c377fc19
commit
73ac5f89f0
1 changed files with 8 additions and 1 deletions
|
@ -64,7 +64,14 @@ impl log::Log for Logger {
|
||||||
|
|
||||||
fn log(&self, record: &Record) {
|
fn log(&self, record: &Record) {
|
||||||
if self.enabled(record.metadata()) {
|
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) {}
|
fn flush(&self) {}
|
||||||
|
|
Loading…
Reference in a new issue