pub struct Testing { /* private fields */ }
Expand description
An appender that writes log records that can be captured by a test harness (like cargo test
),
and thus the outputs are suppressed unless --nocapture
or --show-output
is specified.
§Examples
use logforth_core::append::Testing;
let test_appender = Testing::default();
Implementations§
Source§impl Testing
impl Testing
Sourcepub fn with_layout(self, layout: impl Into<Box<dyn Layout>>) -> Self
pub fn with_layout(self, layout: impl Into<Box<dyn Layout>>) -> Self
Set the layout for the Testing
appender.
Default to PlainTextLayout
.
§Examples
use logforth_core::append::Testing;
use logforth_core::layout::PlainTextLayout;
let test_appender = Testing::default().with_layout(PlainTextLayout::default());
Trait Implementations§
Source§impl Append for Testing
impl Append for Testing
Auto Trait Implementations§
impl Freeze for Testing
impl !RefUnwindSafe for Testing
impl Send for Testing
impl Sync for Testing
impl Unpin for Testing
impl !UnwindSafe for Testing
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