[][src]Struct gelf_logger::Config

pub struct Config { /* fields omitted */ }

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<String, 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 Clone for Config[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Config[src]

impl<'de> Deserialize<'de> for Config[src]

Auto Trait Implementations

impl Send for Config

impl Sync for Config

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]