[−][src]Struct gelf_logger::Config
Struct to manipulate configuration.
Methods
impl Config
[src]
pub fn try_from_yaml(path: &str) -> Result<Config, Error>
[src]
Load configuration using the given path
file.
Example
use gelf_logger::Config; let config = Config::try_from_yaml("/tmp/myconf.yml").unwrap();
pub fn level(&self) -> &GelfLevel
[src]
The threshold for this logger to level. Logging messages which are less severe than level will be ignored.
pub fn hostname(&self) -> &String
[src]
The name of the remote server.
pub fn port(&self) -> &u64
[src]
The port of the remote host.
pub fn null_character(&self) -> &bool
[src]
Adds a NUL byte (\0
) after each entry.
pub fn use_tls(&self) -> &bool
[src]
Activate transport security.
pub fn buffer_size(&self) -> &Option<usize>
[src]
Get the upperbound limit on the number of records that can be placed in the buffer, once this size has been reached, the buffer will be sent to the remote server.
pub fn buffer_duration(&self) -> &Option<u64>
[src]
Get the maximum lifetime (in milli seconds) of the buffer before send it to the remote server.
pub fn additional_fields(&self) -> &BTreeMap<Value, Value>
[src]
Every additional data which will be append to each log entry.
pub fn builder() -> ConfigBuilder
[src]
Returns a new builder.
Trait Implementations
impl<'_> From<&'_ Config> for GelfTcpOutput
[src]
fn from(cfg: &Config) -> GelfTcpOutput
[src]
impl Clone for Config
[src]
impl Debug for Config
[src]
impl<'de> Deserialize<'de> for Config
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
impl RefUnwindSafe for Config
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,