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
LogControl1implementation forlog.
Traits§
- LogFactory
- A factory for log implementations.
Functions§
- from_
log_ level - Convert
logcontrol::LogLeveltolog::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§
- Controlled
Log - The type of a controlled
log::Log.