Crates.io | acap-logging |
lib.rs | acap-logging |
version | 0.1.0 |
source | src |
created_at | 2024-06-19 21:43:12.838445 |
updated_at | 2024-10-17 16:59:46.106424 |
description | Logging utilities for ACAP applications |
homepage | https://github.com/AxisCommunications/acap-rs |
repository | https://github.com/AxisCommunications/acap-rs |
max_upload_size | |
id | 1277375 |
size | 3,501 |
Logging utilities for ACAP applications
The logger is initialized as early as possible:
use log::{error, warn};
fn main() {
# std::env::set_var("RUST_LOG_STYLE", "always");
error!("This will never be shown");
acap_logging::init_logger();
error!("This will usually be shown");
}
trace
level will not be shown in the system logs on target.warn
level or less severe will not be shown in terminals by default.tracing
crate is used in place of the log
crate, its log
feature must be enabled.