[−][src]Struct tracing_gelf::Builder
A builder for Logger
.
Methods
impl Builder
[src]
pub fn additional_field<K: ToString, V: Into<Value>>(
&mut self,
key: K,
value: V
) -> &mut Self
[src]
&mut self,
key: K,
value: V
) -> &mut Self
Add a persistent additional field to the GELF messages.
pub fn version<V: ToString>(&mut self, version: V)
[src]
Set the GELF version number. Defaults to "1.1".
pub fn line_numbers(&mut self, value: bool) -> &mut Self
[src]
Set whether line numbers should be logged. Defaults to true.
pub fn file_names(&mut self, value: bool) -> &mut Self
[src]
Set whether file names should be logged. Defaults to true.
pub fn module_paths(&mut self, value: bool) -> &mut Self
[src]
Set whether module paths should be logged. Defaults to true.
pub fn reconnection_timeout(&mut self, millis: u32) -> &mut Self
[src]
Set the reconnection timeout in milliseconds. Defaults to 10 seconds.
pub fn buffer(&mut self, length: usize) -> &mut Self
[src]
Sets the buffer length. Defaults to 512.
pub fn connect_tcp<A>(
self,
addr: A
) -> Result<(Logger, Pin<Box<dyn Future<Output = ()> + Send>>), BuilderError> where
A: ToSocketAddrs,
A: 'static + Clone + Send + Sync,
[src]
self,
addr: A
) -> Result<(Logger, Pin<Box<dyn Future<Output = ()> + Send>>), BuilderError> where
A: ToSocketAddrs,
A: 'static + Clone + Send + Sync,
Return Logger
and TCP connection background task.
pub fn init_tcp_with_subscriber<A, S>(
self,
addr: A,
subscriber: S
) -> Result<Pin<Box<dyn Future<Output = ()> + Send>>, BuilderError> where
A: ToSocketAddrs,
A: 'static + Clone + Send + Sync,
S: Subscriber + Send + Sync + 'static,
[src]
self,
addr: A,
subscriber: S
) -> Result<Pin<Box<dyn Future<Output = ()> + Send>>, BuilderError> where
A: ToSocketAddrs,
A: 'static + Clone + Send + Sync,
S: Subscriber + Send + Sync + 'static,
Initialize logging with a given Subscriber
and return TCP connection background task.
pub fn init_tcp<A>(
self,
addr: A
) -> Result<Pin<Box<dyn Future<Output = ()> + Send>>, BuilderError> where
A: ToSocketAddrs,
A: 'static + Clone + Send + Sync,
[src]
self,
addr: A
) -> Result<Pin<Box<dyn Future<Output = ()> + Send>>, BuilderError> where
A: ToSocketAddrs,
A: 'static + Clone + Send + Sync,
Initialize logging and return TCP connection background task.
pub fn connect_udp(
self,
addr: SocketAddr
) -> Result<(Logger, Pin<Box<dyn Future<Output = ()> + Send>>), BuilderError>
[src]
self,
addr: SocketAddr
) -> Result<(Logger, Pin<Box<dyn Future<Output = ()> + Send>>), BuilderError>
Return Logger
layer and a UDP connection background task.
pub fn init_udp_with_subscriber<S>(
self,
addr: SocketAddr,
subscriber: S
) -> Result<Pin<Box<dyn Future<Output = ()> + Send>>, BuilderError> where
S: Subscriber + Send + Sync + 'static,
[src]
self,
addr: SocketAddr,
subscriber: S
) -> Result<Pin<Box<dyn Future<Output = ()> + Send>>, BuilderError> where
S: Subscriber + Send + Sync + 'static,
Initialize logging with a given Subscriber
and return UDP connection background task.
pub fn init_udp<A>(
self,
addr: SocketAddr
) -> Result<Pin<Box<dyn Future<Output = ()> + Send>>, BuilderError>
[src]
self,
addr: SocketAddr
) -> Result<Pin<Box<dyn Future<Output = ()> + Send>>, BuilderError>
Initialize logging and return UDP connection background task.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[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.
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>,