Struct sirlog::Configuration[][src]

pub struct Configuration {
    pub destination: Sender<Arc<Log>>,
    pub process: String,
}

A logging configuration

Fields

destination: Sender<Arc<Log>>

the destination for log messages to be delivered

process: String

the name of the process that generates the logs being sent

Implementations

impl Configuration[src]

pub fn named<S: Display>(process: S, sender: Sender<Arc<Log>>) -> Self[src]

Create a new configuration using the

pub fn set_global(config: Self)[src]

Set the global logging configuration. If no other configuration is found, this one is used.

Panics

Panics if another global logging configuration has already been set

pub async fn run<F: Future<Output = R> + Send, R: Send>(self, future: F) -> R[src]

Executes a Future with the configuration. Log messages from within code executed by the future will be submitted through this configuration

Trait Implementations

impl Debug for Configuration[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.