pub struct CloudWatch {}Expand description
A factory for creating various AWS CloudWatch logging implementations.
This factory provides entry points for three primary CloudWatch logging strategies:
- Config-based: Explicitly providing AWS credentials and region.
- Env-based: Automatic credential discovery using the standard AWS environment variables.
- Cout-based: JSON-formatted stdout logging for Lambda, ECS, and Fargate.
Implementations§
Source§impl CloudWatch
impl CloudWatch
Sourcepub fn config(self, config: CloudWatchConfig) -> CloudWatchConfig
pub fn config(self, config: CloudWatchConfig) -> CloudWatchConfig
Begins building a CloudWatch logger using a manual configuration.
Sourcepub fn env<S>(self, log_group: S) -> CloudWatchEnv
pub fn env<S>(self, log_group: S) -> CloudWatchEnv
Begins building a CloudWatch logger that pulls credentials from the environment.
Source§impl CloudWatch
impl CloudWatch
Sourcepub fn cout(self) -> CloudWatchCout
pub fn cout(self) -> CloudWatchCout
Begins building a CloudWatch stdout JSON logger.
This is recommended for AWS Lambda and containerized services where the log driver handles the actual AWS API interaction.
Auto Trait Implementations§
impl Freeze for CloudWatch
impl RefUnwindSafe for CloudWatch
impl Send for CloudWatch
impl Sync for CloudWatch
impl Unpin for CloudWatch
impl UnwindSafe for CloudWatch
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.