pub struct Output { /* private fields */ }
Expand description
Structure holding your output targets
Implementations
sourceimpl Output
impl Output
sourcepub fn add_target(self, target: Target) -> Result<Self, Error>
pub fn add_target(self, target: Target) -> Result<Self, Error>
Add a target to output to
sourcepub fn use_as_logger(self, level: Level) -> Result<Self, Error>
pub fn use_as_logger(self, level: Level) -> Result<Self, Error>
Initializes the global logger with an Output
instance with
max_log_level
set to a specific log level.
let output = convey::new()
.add_target(convey::human::stdout()?)?
.use_as_logger(log::Level::Debug)?;
log::info!("welcome");
log::error!("oh noes");
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnwindSafe for Output
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more