Crate logcontrol_log

Source
Expand description

A LogControl1 implementation for log.

LogController provides a LogControl1 implementation on top of log which uses the log_reload crate to dynamically switch loggers and levels depending on the target and level selected over the log control interface.

It uses a LogFactory implementation to create the actual Log instances each time the log target is changed. This crates provides no default implementation of this trait; users have to provide an implementation on their own. This avoids a dependency on any specific log implementation for the console target.

For the journal target this crate uses the systemd_journal_logger crate.

See LogController::install_auto for the recommended entry point to this crate.

Re-exports§

pub use logcontrol;

Structs§

LogController
A LogControl1 implementation for log.

Traits§

LogFactory
A factory for log implementations.

Functions§

from_log_level
Convert logcontrol::LogLevel to log::Level.
stderr_connected_to_journal
Whether the current process is directly connected to the systemd journal.
syslog_identifier
Determine the syslog identifier for this process.

Type Aliases§

ControlledLog
The type of a controlled log::Log.