Struct flexi_logger::DeferredNow [−][src]
pub struct DeferredNow(_);
Expand description
Deferred timestamp creation.
Is used to ensure that a log record that is sent to multiple outputs (in maybe different formats) always uses the same timestamp.
Implementations
Retrieve the timestamp.
Requires mutability because the first caller will generate the timestamp.
Enforce the use of UTC rather than local time.
By default, flexi_logger
uses or tries to use local time.
By calling early in your program either Logger::use_utc()
or directly this method,
you can override this to always use UTC.
Panics
Panics if called too late, i.e., if DeferredNow::now
was already called before on
any instance of DeferredNow
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DeferredNow
impl Send for DeferredNow
impl Sync for DeferredNow
impl Unpin for DeferredNow
impl UnwindSafe for DeferredNow
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more