pub struct ConsoleSink;Expand description
Human-oriented stdout sink, with no terminal-color assumptions.
Implementations§
Source§impl ConsoleSink
impl ConsoleSink
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a plain console sink.
Examples found in repository?
examples/component_filter.rs (line 26)
19fn main() {
20 // All components start at V4, keeping normal output concise.
21 let mut policy = LogPolicy::new(Verbosity::V4);
22
23 // Synchronization may need temporary I/O and timing diagnostics.
24 policy.set_component("sync", Verbosity::V8);
25
26 let log = LogDispatcher::new(policy, vec![Arc::new(ConsoleSink::new())]);
27
28 let event = log.event(0, "sync");
29
30 // This V7 event is selected only because the sync override allows it.
31 event.verbosity(7).debug("batch details");
32}Trait Implementations§
Source§impl Debug for ConsoleSink
impl Debug for ConsoleSink
Source§impl Default for ConsoleSink
impl Default for ConsoleSink
Source§fn default() -> ConsoleSink
fn default() -> ConsoleSink
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConsoleSink
impl RefUnwindSafe for ConsoleSink
impl Send for ConsoleSink
impl Sync for ConsoleSink
impl Unpin for ConsoleSink
impl UnsafeUnpin for ConsoleSink
impl UnwindSafe for ConsoleSink
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