pub struct LogCrateProxy { /* private fields */ }
Expand description

Log crate proxy.

It forwards all logs from log crate to default_logger by default, and you can set a separate logger for it via LogCrateProxy::set_logger.

Note that the log crate uses a different log level filter and by default it rejects all log messages. To log messages via the log crate, you have to call log::set_max_level manually before logging. For more information, please read the documentation of log::set_max_level.

Examples

See ./examples directory.

Implementations

This is supported on crate feature log only.

Swaps a logger.

If the argument logger is None, the return value of default_logger will be used.

This is supported on crate feature log only.

Sets a logger.

If the argument logger is None, the return value of default_logger will be used.

Trait Implementations

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

Determines if a log message with the specified metadata would be logged. Read more

Logs the Record. Read more

Flushes any buffered records.

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.