Struct tracing_gelf::Builder [−][src]
A builder for Logger
.
Implementations
impl Builder
[src]
pub fn additional_field<K: ToString, V: Into<Value>>(
mut self: Self,
key: K,
value: V
) -> Self
[src]
mut self: Self,
key: K,
value: V
) -> Self
Add a persistent additional field to the GELF messages.
pub fn version<V: ToString>(mut self: Self, version: V) -> Self
[src]
Set the GELF version number. Defaults to "1.1".
pub fn line_numbers(mut self: Self, value: bool) -> Self
[src]
Set whether line numbers should be logged. Defaults to true.
pub fn file_names(mut self: Self, value: bool) -> Self
[src]
Set whether file names should be logged. Defaults to true.
pub fn module_paths(mut self: Self, value: bool) -> Self
[src]
Set whether module paths should be logged. Defaults to true.
pub fn reconnection_timeout(mut self: Self, millis: u32) -> Self
[src]
Set the reconnection timeout in milliseconds. Defaults to 10 seconds.
pub fn buffer(mut self: Self, length: usize) -> Self
[src]
Sets the buffer length. Defaults to 512.
pub fn connect_tcp<T>(
self,
addr: T
) -> Result<(Logger, Pin<Box<dyn Future<Output = ()> + Send>>), BuilderError> where
T: ToSocketAddrs,
T: Send + Sync + 'static,
[src]
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,
[src]
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.
pub fn init_tcp<T>(
self,
addr: T
) -> Result<Pin<Box<dyn Future<Output = ()> + Send>>, BuilderError> where
T: ToSocketAddrs,
T: Send + Sync + 'static,
[src]
self,
addr: T
) -> Result<Pin<Box<dyn Future<Output = ()> + Send>>, BuilderError> where
T: ToSocketAddrs,
T: Send + Sync + 'static,
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,
[src]
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,
[src]
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.
pub fn init_udp<T>(
self,
addr: T
) -> Result<Pin<Box<dyn Future<Output = ()> + Send>>, BuilderError> where
T: ToSocketAddrs,
T: Send + Sync + 'static,
[src]
self,
addr: T
) -> Result<Pin<Box<dyn Future<Output = ()> + Send>>, BuilderError> where
T: ToSocketAddrs,
T: Send + Sync + 'static,
Initialize logging and return UDP connection background task.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Builder
[src]
impl Send for Builder
[src]
impl Sync for Builder
[src]
impl Unpin for Builder
[src]
impl UnwindSafe for Builder
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,