macro_rules! logging_setup {
    ($name:expr) => { ... };
    ($name:expr, $level:path) => { ... };
}
Expand description

Helper macro to set up the logger for the program

All log messages will be sent to rsyslog using the User facility. Additionally, they will also be echoed to stdout

Arguments

  • name - The application name which should be used for all log messages
  • level - The minimum logging level which should be recorded (Default: Debug)

Examples

use kubos_app::logging_setup;
// Initialize logging at default Debug level, using identifier "my_app"
logging_setup!("my_app");
use kubos_app::logging_setup;
use log::*;

// Initialize logging at Info level, using the crate name for the identifier
logging_setup!(env!("CARGO_PKG_NAME"), log::LevelFilter::Info);