Skip to main content

hyperlane_plugin_logger/
enum.rs

1use super::*;
2
3/// Output wire format emitted by [`LoggerPlugin`].
4#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
5pub enum LogFormat {
6    /// Human-readable single-line `<LEVEL> <MESSAGE>` format.
7    #[default]
8    Plain,
9    /// Structured single-line JSON object `{"level":"...","target":"...","message":"..."}`.
10    Json,
11}
12
13/// Commands dispatched over the bounded channel to the background file writer thread.
14pub(crate) enum WriterCommand {
15    /// Appends one pre-formatted line terminated by `\n`.
16    Line(String),
17    /// Flushes the buffered writer and notifies the caller through the barrier channel.
18    Flush(SyncSender<()>),
19}