pub struct LogWriter;Available on crate feature
logging only.Expand description
Prints each received event as one readable line on standard output.
This type uses the queue, loss, panic, and shutdown contract defined by Subscribe.
The output is designed for local visibility. Do not parse it as an API or rely on its field
set for task correlation. It omits some Event fields, including id and at.
§Examples
use std::sync::Arc;
use taskvisor::{LogWriter, Subscribe, Supervisor, SupervisorConfig};
let subscribers: Vec<Arc<dyn Subscribe>> = vec![Arc::new(LogWriter)];
let supervisor = Supervisor::new(SupervisorConfig::default(), subscribers);Trait Implementations§
Auto Trait Implementations§
impl Freeze for LogWriter
impl RefUnwindSafe for LogWriter
impl Send for LogWriter
impl Sync for LogWriter
impl Unpin for LogWriter
impl UnsafeUnpin for LogWriter
impl UnwindSafe for LogWriter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more