pub struct BaseLogInfo {
pub timestamp: DateTime<Utc>,
pub hostname: String,
pub component: String,
pub process_id: u32,
pub log_level: PostfixLogLevel,
pub message: String,
pub raw_message: String,
}Expand description
基础日志信息
从原始日志行中解析出的基础字段,是所有组件事件的共同基础
Fields§
§timestamp: DateTime<Utc>日志时间戳(UTC时间) 从日志行开头的时间信息解析而来,自动转换为UTC时间
hostname: String主机名(产生日志的服务器名称) 从日志行中的第二个字段提取,用于区分不同的邮件服务器
component: StringPostfix组件名称(产生此日志的具体组件) 如:smtpd, qmgr, smtp, cleanup等,对应Postfix架构中的不同模块
process_id: u32进程ID(产生日志的进程标识符) 从方括号内提取,用于区分同一组件的不同进程实例
log_level: PostfixLogLevel日志等级(消息的重要性和严重程度) 从消息内容中识别或默认为Info级别
message: String处理后的消息内容(去除日志等级前缀后的净消息) 这是组件解析器实际处理的内容
raw_message: String原始消息内容(从冒号后的完整消息) 保留用于调试和追溯
Trait Implementations§
Source§impl Clone for BaseLogInfo
impl Clone for BaseLogInfo
Source§fn clone(&self) -> BaseLogInfo
fn clone(&self) -> BaseLogInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BaseLogInfo
impl Debug for BaseLogInfo
Source§impl PartialEq for BaseLogInfo
impl PartialEq for BaseLogInfo
impl StructuralPartialEq for BaseLogInfo
Auto Trait Implementations§
impl Freeze for BaseLogInfo
impl RefUnwindSafe for BaseLogInfo
impl Send for BaseLogInfo
impl Sync for BaseLogInfo
impl Unpin for BaseLogInfo
impl UnwindSafe for BaseLogInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more