pub struct CloudWatchCout { /* private fields */ }Expand description
A builder state for the high-performance JSON-to-stdout logging service.
Defaults to 3 retries and 1 background worker to ensure ordered log ingestion.
Implementations§
Source§impl CloudWatchCout
impl CloudWatchCout
Sourcepub fn new(max_retries: usize, worker_count: usize) -> Self
pub fn new(max_retries: usize, worker_count: usize) -> Self
Creates a new Cout factory with specific retry and worker settings.
Sourcepub fn get_worker_count(&self) -> usize
pub fn get_worker_count(&self) -> usize
Returns the configured background worker count.
Sourcepub fn get_max_retries(&self) -> usize
pub fn get_max_retries(&self) -> usize
Returns the configured maximum retry attempts.
Sourcepub fn worker_count(self, worker_count: usize) -> CloudWatchCout
pub fn worker_count(self, worker_count: usize) -> CloudWatchCout
Sets the number of background workers (only applicable for Concurrency::Async).
Sourcepub fn max_retries(self, max_retries: usize) -> CloudWatchCout
pub fn max_retries(self, max_retries: usize) -> CloudWatchCout
Sets the maximum retry attempts if the standard output write fails.
Sourcepub fn build(self, concurrency: Concurrency) -> Logger
pub fn build(self, concurrency: Concurrency) -> Logger
Finalizes the logger using the specified Concurrency model.
Sourcepub fn build_direct(self) -> Logger
pub fn build_direct(self) -> Logger
Shortcut for building a synchronous DirectLogger.
Sourcepub fn build_queued(self) -> Logger
pub fn build_queued(self) -> Logger
Shortcut for building an asynchronous QueuedLogger.
Sourcepub fn build_impl_direct(self) -> Box<DirectLogger>
pub fn build_impl_direct(self) -> Box<DirectLogger>
Builds the underlying DirectLogger implementation.
Sourcepub fn build_impl_queued(self) -> Box<QueuedLogger>
pub fn build_impl_queued(self) -> Box<QueuedLogger>
Builds the underlying QueuedLogger implementation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CloudWatchCout
impl RefUnwindSafe for CloudWatchCout
impl Send for CloudWatchCout
impl Sync for CloudWatchCout
impl Unpin for CloudWatchCout
impl UnwindSafe for CloudWatchCout
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.