Skip to main content

msg_info

Macro msg_info 

Source
macro_rules! msg_info {
    ($msg:expr) => { ... };
    ($msg:expr, true) => { ... };
}
Expand description

Prints an informational message with ℹ️ prefix and automatic routing.

This macro displays informational messages that provide useful context or status updates to users. Info messages help users understand what the system is doing and provide transparency into system operations.

§Visual Design

  • Prefix: ℹ️ (information emoji)
  • Purpose: Status updates and informational content
  • Tone: Neutral, informative, helpful

§Information Categories

Info messages are appropriate for:

  • Status Updates: Progress information for long-running operations
  • System State: Current system status and configuration
  • Process Information: What the system is currently doing
  • User Guidance: Helpful tips and usage information
  • Confirmation: Non-critical confirmations and acknowledgments

§Usage Patterns

§Simple Info Message

use kasl::msg_info;
use kasl::libs::messages::types::Message;

msg_info!(Message::WatcherStarted(1234));
// Output: "ℹ️ Watcher started with PID: 1234"

§Info Message with Line Breaks

use kasl::msg_info;
use kasl::libs::messages::types::Message;

msg_info!(Message::WorkingHoursForMonth("2025-01".to_string()), true);
// Output: "\nℹ️ 📅 Monthly Summary\n"