Struct spdlog::sink::AsyncPoolSinkBuilder
source · pub struct AsyncPoolSinkBuilder { /* private fields */ }Available on crate feature
multi-thread only.Expand description
The builder of AsyncPoolSink.
Implementations§
source§impl AsyncPoolSinkBuilder
impl AsyncPoolSinkBuilder
sourcepub fn sinks<I>(self, sinks: I) -> Selfwhere
I: IntoIterator<Item = Arc<dyn Sink>>,
pub fn sinks<I>(self, sinks: I) -> Selfwhere
I: IntoIterator<Item = Arc<dyn Sink>>,
Add multiple Sinks.
sourcepub fn overflow_policy(self, overflow_policy: OverflowPolicy) -> Self
pub fn overflow_policy(self, overflow_policy: OverflowPolicy) -> Self
Specifies a overflow policy.
This parameter is optional, and defaults to
OverflowPolicy::Block.
For more details, see the documentation of OverflowPolicy.
sourcepub fn thread_pool(self, thread_pool: Arc<ThreadPool>) -> Self
pub fn thread_pool(self, thread_pool: Arc<ThreadPool>) -> Self
Specifies a custom thread pool.
This parameter is optional, and defaults to the built-in thread pool.
For more details, see the documentation of AsyncPoolSinkBuilder.
sourcepub fn build(self) -> Result<AsyncPoolSink>
pub fn build(self) -> Result<AsyncPoolSink>
Builds a AsyncPoolSink.
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 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.