Struct alog::Config

source ·
pub struct Config<'a> {
    pub ipv4: &'a str,
    pub ipv6: &'a str,
    pub host: &'a str,
    pub skip: bool,
    pub authuser: bool,
    pub trim: bool,
    pub optimize: bool,
    pub flush: bool,
}
Expand description

Collection of replacement strings / config flags

Fields§

§ipv4: &'a str

IPv4-parseable $remote_addr replacement string

§ipv6: &'a str

IPv6-parseable $remote_addr replacement string

§host: &'a str

$remote_addr replacement string

§skip: bool

Skip lines w/o a $remote_addr part / first word

§authuser: bool

Try to clear the authuser field

§trim: bool

Trim spaces from the start of every line

§optimize: bool

Don’t clear authuser fields starting with “- [” We assume these fields are already cleared.

§flush: bool

Flush output after each line

Implementations§

Get IPv4 replacement value

Get IPv6 replacement value

Get string replacement value

Get skip value

Get authuser value

Get trim value

Get optimize value

Get flush value

Set IPv4 replacement String

Set IPv6 replacement String

Set hostname replacement String

Set flush field

Set authuser field

Set trim field

Set optimize field

Set skip field

Trait Implementations§

Formats the value using the given formatter. Read more

$remote_addr replacements default to an equivalent of localhost

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.