pub fn format_log_entry(entry: &LogEntry) -> StringExpand description
Format a LogEntry into a human-readable string.
The output format is: [TIMESTAMP] LEVEL: message
§Arguments
entry— TheLogEntryto format.
§Examples
use cvkg_cli::devtools::{LogEntry, LogLevel, format_log_entry};
let entry = LogEntry {
timestamp: "2025-01-01T00:00:00Z".to_string(),
level: LogLevel::Info,
message: "Application started".to_string(),
};
let formatted = format_log_entry(&entry);
assert_eq!(formatted, "[2025-01-01T00:00:00Z] INFO: Application started");