Expand description
Logging utilities for ACAP applications
§Example
The logger is initialized as early as possible:
use log::{error, warn};
fn main() {
error!("This will never be shown");
acap_logging::init_logger();
error!("This will usually be shown");
}§Pitfalls
- Messages logged at the
tracelevel will not be shown in the system logs on target. - Messages logged at the
warnlevel or less severe will not be shown in terminals by default. - When the
tracingcrate is used in place of thelogcrate, itslogfeature must be enabled.
Functions§
- init_
logger - Set up app-logging as appropriate for the environment, then run the provided function.