pub struct LogParams<'a> { /* private fields */ }
Expand description
These parameters determine the behavior of an instance of logging.
Implementations§
Source§impl<'a> LogParams<'a>
impl<'a> LogParams<'a>
Sourcepub fn new(logger_name: LoggerName<'a>) -> Self
pub fn new(logger_name: LoggerName<'a>) -> Self
Create a set of default log parameters, given the name of a logger
Sourcepub fn get_logger_name(&self) -> &LoggerName<'_>
pub fn get_logger_name(&self) -> &LoggerName<'_>
Get the logger name
Sourcepub fn get_severity(&self) -> LogSeverity
pub fn get_severity(&self) -> LogSeverity
Get the severity of the log
Sourcepub fn get_occurence(&self) -> LogOccurrence
pub fn get_occurence(&self) -> LogOccurrence
Get the occurrence
Sourcepub fn get_throttle(&self) -> Duration
pub fn get_throttle(&self) -> Duration
Get the throttle interval duration
Sourcepub fn get_throttle_clock(&self) -> ThrottleClock<'a>
pub fn get_throttle_clock(&self) -> ThrottleClock<'a>
Get the throttle clock
Sourcepub fn get_user_filter(&self) -> bool
pub fn get_user_filter(&self) -> bool
Get the arbitrary filter set by the user
Trait Implementations§
Source§impl<'a> ToLogParams<'a> for LogParams<'a>
impl<'a> ToLogParams<'a> for LogParams<'a>
Source§fn to_log_params(self) -> LogParams<'a>
fn to_log_params(self) -> LogParams<'a>
Convert the object into LogParams with default settings
Source§fn skip_first(self) -> LogParams<'a>
fn skip_first(self) -> LogParams<'a>
The first time the logging happens, we should skip it
Source§fn occurs(self, occurs: LogOccurrence) -> LogParams<'a>
fn occurs(self, occurs: LogOccurrence) -> LogParams<'a>
Set the occurrence behavior of the log instance
Source§fn throttle(self, throttle: Duration) -> LogParams<'a>
fn throttle(self, throttle: Duration) -> LogParams<'a>
Set a throttling interval during which this log will not publish. A value
of zero will never block the message from being published, and this is the
default behavior. Read more
Source§fn throttle_clock(self, clock: ThrottleClock<'a>) -> LogParams<'a>
fn throttle_clock(self, clock: ThrottleClock<'a>) -> LogParams<'a>
Set the clock that will be used to control throttling.
Source§fn only_if(self, only_if: bool) -> LogParams<'a>
fn only_if(self, only_if: bool) -> LogParams<'a>
The log will not be published if a
false
expression is passed into
this function. Read moreimpl<'a> Copy for LogParams<'a>
Auto Trait Implementations§
impl<'a> Freeze for LogParams<'a>
impl<'a> RefUnwindSafe for LogParams<'a>
impl<'a> Send for LogParams<'a>
impl<'a> Sync for LogParams<'a>
impl<'a> Unpin for LogParams<'a>
impl<'a> UnwindSafe for LogParams<'a>
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