p2p_chat/ui/log_entry.rs
1//! This module defines the structure for a single log entry.
2use chrono::{DateTime, Utc};
3use tracing::Level;
4
5/// Represents a single log entry with timestamp, level, module, and message.
6#[derive(Debug, Clone)]
7pub struct LogEntry {
8 /// The timestamp when the log entry was created.
9 pub timestamp: DateTime<Utc>,
10 /// The log level (e.g., INFO, DEBUG, ERROR).
11 pub level: Level,
12 /// The module path where the log originated.
13 pub module: String,
14 /// The log message content.
15 pub message: String,
16}