pub(crate) mod consumer;
pub use consumer::{LogConsumer, LoggingConsumer};
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum LogFrame {
StdOut(Vec<u8>),
StdErr(Vec<u8>),
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum LogSource {
StdOut,
StdErr,
BothStd,
}
impl LogFrame {
pub fn source(&self) -> LogSource {
match self {
LogFrame::StdOut(_) => LogSource::StdOut,
LogFrame::StdErr(_) => LogSource::StdErr,
}
}
pub fn bytes(&self) -> &[u8] {
match self {
LogFrame::StdOut(bytes) => bytes,
LogFrame::StdErr(bytes) => bytes,
}
}
}