MessageFormatter

Trait MessageFormatter 

Source
pub trait MessageFormatter: Send + Sync {
    // Required method
    fn format(&self, message: &Message) -> String;
}
Expand description

Defines a strategy for converting a log message into a string format compatible with CloudWatch Logs.

Implementations of this trait determine how the structured log data (metadata, levels, and content) is serialized before transmission.

Required Methods§

Source

fn format(&self, message: &Message) -> String

Formats a single Message into its string representation.

Implementors§