Struct timely_logging::Logger[][src]

pub struct Logger<T, E> { /* fields omitted */ }

A buffering logger.

Methods

impl<T, E: Clone> Logger<T, E>
[src]

Allocates a new shareable logger bound to a write destination.

Logs an event.

The event has its timestamp recorded at the moment of logging, but it may be delayed due to buffering. It will be written when the logger is next flushed, either due to the buffer reaching capacity or a direct call to flush.

This implementation borrows a shared (but thread-local) buffer of log events, to ensure that the action only sees one stream of events with increasing timestamps. This may have a cost that we don't entirely understand.

Flushes logged messages and communicates the new minimal timestamp.

Trait Implementations

impl<T, E: Clone> Clone for Logger<T, E>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T, E> Drop for Logger<T, E>
[src]

Bit weird, because we only have to flush on the last drop, but this should be ok.

Executes the destructor for this type. Read more

Auto Trait Implementations

impl<T, E> !Send for Logger<T, E>

impl<T, E> !Sync for Logger<T, E>