Trait structured_logger::Writer
source · pub trait Writer {
// Required method
fn write_log(
&self,
value: &BTreeMap<Key<'_>, Value<'_>>
) -> Result<(), Error>;
}
Expand description
A trait that defines how to write a log. You can implement this trait for your custom formatting and writing destination.
Implementation examples:
Required Methods§
Implementors§
impl<W: Write + Sync + Send + 'static> Writer for JSONWriter<W>
Implements Writer trait for JSONWriter.
impl<W: AsyncWrite + Sync + Send + 'static> Writer for AsyncJSONWriter<W>
Implements Writer trait for AsyncJSONWriter.