Added timestamp to outputs

This commit is contained in:
Dennis Schwerdel 2016-08-12 08:36:09 +02:00
parent 5e7d3b5e08
commit 00296a660d
1 changed files with 5 additions and 1 deletions

View File

@ -91,7 +91,11 @@ impl log::Log for SimpleLogger {
#[inline]
fn log(&self, record: &log::LogRecord) {
if self.enabled(record.metadata()) {
println!("{} - {}", record.level(), record.args());
println!("{} - {} - {}",
time::strftime("%F %T", &time::now()).expect("Failed to format timestamp"),
record.level(),
record.args()
);
}
}
}