diff --git a/src/main.rs b/src/main.rs index 0859d4184..e4a832aab 100644 --- a/src/main.rs +++ b/src/main.rs @@ -73,8 +73,9 @@ impl log::Log for Logger { if record.file().is_some() && record.line().is_some() { writeln!( *(*(self.output.lock().unwrap())), - "cloud-hypervisor: {:?}: {}:{}:{} -- {}", + "cloud-hypervisor: {:?}: <{}> {}:{}:{} -- {}", duration, + std::thread::current().name().unwrap_or("anonymous"), record.level(), record.file().unwrap(), record.line().unwrap(), @@ -83,8 +84,9 @@ impl log::Log for Logger { } else { writeln!( *(*(self.output.lock().unwrap())), - "cloud-hypervisor: {:?}: {}:{} -- {}", + "cloud-hypervisor: {:?}: <{}> {}:{} -- {}", duration, + std::thread::current().name().unwrap_or("anonymous"), record.level(), record.target(), record.args()