pub struct TestLoggerBuilder { /* private fields */ }Expand description
Builder for creating a TestLogger with custom configuration
Implementations§
Source§impl TestLoggerBuilder
impl TestLoggerBuilder
Sourcepub fn new(test_name: &str) -> Self
pub fn new(test_name: &str) -> Self
Create a new builder for the given test name.
By default, logs are written to target/test-logs/ relative to the
workspace root (auto-detected via CARGO_MANIFEST_DIR) as JSONL (one
JSON object per line).
Sourcepub fn print_realtime(self, enabled: bool) -> Self
pub fn print_realtime(self, enabled: bool) -> Self
Enable or disable real-time printing
Sourcepub fn use_colors(self, enabled: bool) -> Self
pub fn use_colors(self, enabled: bool) -> Self
Enable or disable ANSI colors
Sourcepub fn max_entries(self, max: usize) -> Self
pub fn max_entries(self, max: usize) -> Self
Set the maximum number of entries to keep in memory
Sourcepub fn log_dir(self, dir: impl Into<PathBuf>) -> Self
pub fn log_dir(self, dir: impl Into<PathBuf>) -> Self
Set the log directory for file persistence
Sourcepub fn build(self) -> TestLogger
pub fn build(self) -> TestLogger
Build the TestLogger
Auto Trait Implementations§
impl Freeze for TestLoggerBuilder
impl RefUnwindSafe for TestLoggerBuilder
impl Send for TestLoggerBuilder
impl Sync for TestLoggerBuilder
impl Unpin for TestLoggerBuilder
impl UnsafeUnpin for TestLoggerBuilder
impl UnwindSafe for TestLoggerBuilder
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