pub struct Logger<Backend: Write, Formatter> {
pub formatter: Formatter,
pub backend: Backend,
}Expand description
Main logging structure
Fields§
§formatter: Formatter§backend: BackendImplementations§
Source§impl<W: Write, F> Logger<W, F>
impl<W: Write, F> Logger<W, F>
pub fn new(backend: W, formatter: F) -> Self
pub fn emerg<T>(&mut self, message: T) -> Result<()>where
F: LogFormat<T>,
pub fn alert<T>(&mut self, message: T) -> Result<()>where
F: LogFormat<T>,
pub fn crit<T>(&mut self, message: T) -> Result<()>where
F: LogFormat<T>,
pub fn err<T>(&mut self, message: T) -> Result<()>where
F: LogFormat<T>,
pub fn warning<T>(&mut self, message: T) -> Result<()>where
F: LogFormat<T>,
pub fn notice<T>(&mut self, message: T) -> Result<()>where
F: LogFormat<T>,
pub fn info<T>(&mut self, message: T) -> Result<()>where
F: LogFormat<T>,
pub fn debug<T>(&mut self, message: T) -> Result<()>where
F: LogFormat<T>,
Auto Trait Implementations§
impl<Backend, Formatter> Freeze for Logger<Backend, Formatter>
impl<Backend, Formatter> RefUnwindSafe for Logger<Backend, Formatter>where
Formatter: RefUnwindSafe,
Backend: RefUnwindSafe,
impl<Backend, Formatter> Send for Logger<Backend, Formatter>
impl<Backend, Formatter> Sync for Logger<Backend, Formatter>
impl<Backend, Formatter> Unpin for Logger<Backend, Formatter>
impl<Backend, Formatter> UnwindSafe for Logger<Backend, Formatter>where
Formatter: UnwindSafe,
Backend: UnwindSafe,
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