Fix: libimagrt: Logging messages to stderr
This commit is contained in:
parent
fa5d1553dd
commit
fa5738d43a
1 changed files with 4 additions and 1 deletions
|
@ -1,3 +1,6 @@
|
|||
use std::io::Write;
|
||||
use std::io::stderr;
|
||||
|
||||
use log::{Log, LogLevel, LogRecord, LogMetadata};
|
||||
|
||||
pub struct ImagLogger {
|
||||
|
@ -23,7 +26,7 @@ impl Log for ImagLogger {
|
|||
fn log(&self, record: &LogRecord) {
|
||||
if self.enabled(record.metadata()) {
|
||||
// TODO: This is just simple logging. Maybe we can enhance this lateron
|
||||
println!("[imag][{: <5}]: {}", record.level(), record.args());
|
||||
writeln!(stderr(), "[imag][{: <5}]: {}", record.level(), record.args());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue