Struct spdlog::sink::WinDebugSinkBuilder
source · pub struct WinDebugSinkBuilder { /* private fields */ }
Available on Windows and crate feature
native
only.Expand description
The builder of WinDebugSink
.
Examples
-
Building a
WinDebugSink
.use spdlog::{prelude::*, sink::WinDebugSink}; let sink: WinDebugSink = WinDebugSink::builder() .level_filter(LevelFilter::MoreSevere(Level::Info)) // optional .build()?;
Implementations§
source§impl WinDebugSinkBuilder
impl WinDebugSinkBuilder
sourcepub fn level_filter(self, level_filter: LevelFilter) -> Self
pub fn level_filter(self, level_filter: LevelFilter) -> Self
Specifies a log level filter.
This parameter is optional, and defaults to LevelFilter::All
.
sourcepub fn formatter(self, formatter: Box<dyn Formatter>) -> Self
pub fn formatter(self, formatter: Box<dyn Formatter>) -> Self
Specifies a formatter.
This parameter is optional, and defaults to FullFormatter
.
sourcepub fn error_handler(self, handler: ErrorHandler) -> Self
pub fn error_handler(self, handler: ErrorHandler) -> Self
Specifies an error handler.
This parameter is optional, and defaults no handler, see Sink::set_error_handler
for details.
sourcepub fn build(self) -> Result<WinDebugSink>
pub fn build(self) -> Result<WinDebugSink>
Builds a WinDebugSink
.
Auto Trait Implementations§
impl !RefUnwindSafe for WinDebugSinkBuilder
impl Send for WinDebugSinkBuilder
impl Sync for WinDebugSinkBuilder
impl Unpin for WinDebugSinkBuilder
impl !UnwindSafe for WinDebugSinkBuilder
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