Struct slog::Failover [] [src]

pub struct Failover<D1: Drain, D2: Drain> {
    // some fields omitted
}

Failover drain

Log everything to logger D1, but in case of it reporting error, try logging to D2. If it also returned an error, forward it up.

Methods

impl<D1: Drain, D2: Drain> Failover<D1, D2>
[src]

Create Failover

Trait Implementations

impl<D1: Drain, D2: Drain> Drain for Failover<D1, D2>
[src]

Write one logging record As an optimization (avoiding allocations), loggers are responsible for providing a byte buffer, that Drain can use for their own needs. Read more