Struct tracing_gelf::Builder [−][src]
pub struct Builder { /* fields omitted */ }
Expand description
A builder for Logger
.
Implementations
Add a persistent additional field to the GELF messages.
Set the GELF version number. Defaults to “1.1”.
Set whether line numbers should be logged. Defaults to true.
Set whether file names should be logged. Defaults to true.
Set whether module paths should be logged. Defaults to true.
Set the reconnection timeout in milliseconds. Defaults to 10 seconds.
pub fn connect_tcp<T>(
self,
addr: T
) -> Result<(Logger, Pin<Box<dyn Future<Output = ()> + Send>>), BuilderError> where
T: ToSocketAddrs,
T: Send + Sync + 'static,
pub fn connect_tcp<T>(
self,
addr: T
) -> Result<(Logger, Pin<Box<dyn Future<Output = ()> + Send>>), BuilderError> where
T: ToSocketAddrs,
T: Send + Sync + 'static,
Return Logger
and TCP connection background task.
pub fn init_tcp_with_subscriber<S, T>(
self,
addr: T,
subscriber: S
) -> Result<Pin<Box<dyn Future<Output = ()> + Send>>, BuilderError> where
S: Subscriber + for<'a> LookupSpan<'a>,
S: Send + Sync + 'static,
T: ToSocketAddrs,
T: Send + Sync + 'static,
pub fn init_tcp_with_subscriber<S, T>(
self,
addr: T,
subscriber: S
) -> Result<Pin<Box<dyn Future<Output = ()> + Send>>, BuilderError> where
S: Subscriber + for<'a> LookupSpan<'a>,
S: Send + Sync + 'static,
T: ToSocketAddrs,
T: Send + Sync + 'static,
Initialize logging with a given Subscriber
and return TCP connection background task.
Initialize logging and return TCP connection background task.
pub fn connect_udp<T>(
self,
addr: T
) -> Result<(Logger, Pin<Box<dyn Future<Output = ()> + Send>>), BuilderError> where
T: ToSocketAddrs,
T: Send + Sync + 'static,
pub fn connect_udp<T>(
self,
addr: T
) -> Result<(Logger, Pin<Box<dyn Future<Output = ()> + Send>>), BuilderError> where
T: ToSocketAddrs,
T: Send + Sync + 'static,
Return Logger
layer and a UDP connection background task.
pub fn init_udp_with_subscriber<S, T>(
self,
addr: T,
subscriber: S
) -> Result<Pin<Box<dyn Future<Output = ()> + Send>>, BuilderError> where
S: Subscriber + for<'a> LookupSpan<'a>,
S: Send + Sync + 'static,
T: ToSocketAddrs,
T: Send + Sync + 'static,
pub fn init_udp_with_subscriber<S, T>(
self,
addr: T,
subscriber: S
) -> Result<Pin<Box<dyn Future<Output = ()> + Send>>, BuilderError> where
S: Subscriber + for<'a> LookupSpan<'a>,
S: Send + Sync + 'static,
T: ToSocketAddrs,
T: Send + Sync + 'static,
Initialize logging with a given Subscriber
and return UDP connection background task.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl UnwindSafe for Builder
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. 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