Implement Debug for Runtime

This commit is contained in:
Matthias Beyer 2015-11-27 19:21:40 +01:00
parent 5f564b5e8d
commit 990252e4e4
1 changed files with 16 additions and 0 deletions

View File

@ -3,6 +3,10 @@ extern crate log;
pub use cli::CliConfig;
pub use configuration::Configuration as Cfg;
use std::fmt::Debug;
use std::fmt::Formatter;
use std::fmt::Error;
use log::{LogRecord, LogLevel, LogLevelFilter, LogMetadata, SetLoggerError};
pub struct ImagLogger {
@ -79,3 +83,15 @@ impl<'a> Runtime<'a> {
}
}
impl<'a> Debug for Runtime<'a> {
fn fmt(&self, f: &mut Formatter) -> Result<(), Error> {
write!(f, "Runtime (verbose: {}, debugging: {}, rtp: {})",
self.is_verbose(),
self.is_debugging(),
self.get_rtp())
}
}