Struct android_logger::Config

source ·
pub struct Config { /* private fields */ }
Expand description

Filter for android logger.

Implementations§

👎Deprecated: use .with_max_level() instead

DEPRECATED, use Config::with_max_level() instead.

Changes the maximum log level.

Note, that Trace is the maximum level, because it provides the maximum amount of detail in the emitted logs.

If Off level is provided, then nothing is logged at all.

log::max_level() is considered as the default level.

Sets the format function for formatting the log output.

android_logger::init_once(
    Config::default()
        .with_max_level(log::LevelFilter::Trace)
        .format(|f, record| write!(f, "my_app: {}", record.args()))
)

Trait Implementations§

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.