pub struct Output { /* private fields */ }
Expand description
Structure holding your output targets
Implementations§
Source§impl 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 Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnwindSafe for Output
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more