Struct call_logger::CallLogger
source · pub struct CallLogger { /* private fields */ }Expand description
Implements Log and some simple builder methods to configure.
Implementations§
source§impl CallLogger
impl CallLogger
sourcepub fn new() -> CallLogger
pub fn new() -> CallLogger
Creates a new CallLogger, use this along with the builder methods and then call init to
set up the logger. The default timestamp format is utc epoch (if the timestamps feature
is enabled), and the default call app that is called is echo.
sourcepub fn with_level(self, level: LevelFilter) -> CallLogger
pub fn with_level(self, level: LevelFilter) -> CallLogger
The maximum log level that would be logged
sourcepub fn with_call_target(self, call_target: String) -> CallLogger
pub fn with_call_target(self, call_target: String) -> CallLogger
Sets the command line app or script that is called and passed the log details
sourcepub fn with_epoch_ms_timestamp(self) -> CallLogger
pub fn with_epoch_ms_timestamp(self) -> CallLogger
Sets the timestamp to the number of milliseconds since the epoch
sourcepub fn with_epoch_us_timestamp(self) -> CallLogger
pub fn with_epoch_us_timestamp(self) -> CallLogger
Sets the timestamp to the number of microseconds since the epoch
sourcepub fn with_utc_timestamp(self) -> CallLogger
pub fn with_utc_timestamp(self) -> CallLogger
Sets the timestamp to a the UTC timezone
sourcepub fn with_local_timestamp(self) -> CallLogger
pub fn with_local_timestamp(self) -> CallLogger
Sets the timestamp to a the local timezone
sourcepub fn init(self) -> Result<(), SetLoggerError>
pub fn init(self) -> Result<(), SetLoggerError>
This needs to be called after the builder has set up the logger