Struct diem_logger::DiemLoggerBuilder
source · pub struct DiemLoggerBuilder { /* private fields */ }
Expand description
A builder for a DiemLogger
, configures what, where, and how to write logs.
Implementations§
source§impl DiemLoggerBuilder
impl DiemLoggerBuilder
pub fn new() -> Self
pub fn address(&mut self, address: String) -> &mut Self
pub fn read_env(&mut self) -> &mut Self
pub fn level(&mut self, level: Level) -> &mut Self
pub fn remote_level(&mut self, level: Level) -> &mut Self
pub fn channel_size(&mut self, channel_size: usize) -> &mut Self
pub fn printer( &mut self, printer: Box<dyn Writer + Send + Sync + 'static> ) -> &mut Self
pub fn is_async(&mut self, is_async: bool) -> &mut Self
pub fn custom_format( &mut self, format: fn(_: &LogEntry) -> Result<String, Error> ) -> &mut Self
pub fn init(&mut self)
pub fn build(&mut self) -> Arc<DiemLogger>
Auto Trait Implementations§
impl !RefUnwindSafe for DiemLoggerBuilder
impl Send for DiemLoggerBuilder
impl Sync for DiemLoggerBuilder
impl Unpin for DiemLoggerBuilder
impl !UnwindSafe for DiemLoggerBuilder
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