Struct DefaultLogger
pub struct DefaultLogger(/* private fields */);Expand description
DefaultLogger is a container for an arbitrary number of other loggers.
Implementations§
§impl DefaultLogger
impl DefaultLogger
pub fn push_logger(&self, logger: impl IAbstractLogger) -> Result<(), Error>
pub fn push_logger(&self, logger: impl IAbstractLogger) -> Result<(), Error>
Pushes a custom logger to the DefaultLogger object.
Use this function to append a new custom logger to be used by the DefaultLogger to write log messages.
§Arguments
logger- new logger to be registered within default logger.
pub fn pop_logger(&self) -> Result<(), Error>
pub fn pop_logger(&self) -> Result<(), Error>
Removes the last pushed logger from the DefaultLogger object.
When you no longer need the logger which was last pushed to the DefaultLogger object, use this function to remove that logger.
pub fn pop_all_loggers(&self) -> Result<(), Error>
pub fn pop_all_loggers(&self) -> Result<(), Error>
Removes all custom loggers registered within the DefaultLogger object.
When you call this function, all custom loggers that were pushed with push_logger() are popped from the DefaultLogger object.
After you call this function, the log messages written using the DefaultLogger object are not written anywhere.
Trait Implementations§
§impl Clone for DefaultLogger
impl Clone for DefaultLogger
§fn clone(&self) -> DefaultLogger
fn clone(&self) -> DefaultLogger
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DefaultLogger
impl RefUnwindSafe for DefaultLogger
impl !Send for DefaultLogger
impl !Sync for DefaultLogger
impl Unpin for DefaultLogger
impl UnwindSafe for DefaultLogger
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