rlg

Macro macro_warn_log

Source
macro_rules! macro_warn_log {
    ($time:expr, $component:expr, $description:expr) => { ... };
}
Expand description

This macro creates a WARN level log entry with a default session ID and format. The session ID is generated randomly and the log format defaults to CLF.

§Parameters

  • time: The timestamp of the log entry.
  • component: The system component that generated the log.
  • description: A textual description of the log event.

§Example

use rlg::{macro_warn_log, macro_log};
use rlg::log_level::LogLevel;
use rlg::log_format::LogFormat;
let log = macro_warn_log!("2024-08-29T12:00:00Z", "Auth", "Invalid password attempt");

Usage: let log = macro_warn_log!(time, component, description); Macro for warn log with default session id and format