#applications #logging #warn #acap

acap-logging

Logging utilities for ACAP applications

4 releases

new 0.1.1 May 3, 2025
0.1.0 Oct 17, 2024
0.0.1 Jul 10, 2024
0.0.0 Jun 19, 2024

#9 in #warn

Download history 3/week @ 2025-01-29 34/week @ 2025-02-05 4/week @ 2025-02-19 52/week @ 2025-02-26 24/week @ 2025-03-12 122/week @ 2025-03-19 19/week @ 2025-03-26 1/week @ 2025-04-02 19/week @ 2025-04-09 41/week @ 2025-04-16 14/week @ 2025-04-23

79 downloads per month

MIT license

6KB

Logging utilities for ACAP applications

Example

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");
}

Pitfalls

  • Messages logged at the trace level will not be shown in the system logs on target.
  • Messages logged at the warn level or less severe will not be shown in terminals by default.
  • When the tracing crate is used in place of the log crate, its log feature must be enabled.

Dependencies

~0.2–8.5MB
~76K SLoC