pub trait FormatterPort: Send + Sync {
// Required method
fn format(&self, entry: &LogEntry) -> Result<String, ObservabilityError>;
}Expand description
Port for formatting log entries
Different formatters can be plugged in:
- JsonFormatter (structured JSON output)
- PlainTextFormatter (human-readable text)
- CompactFormatter (single-line JSON)