pub struct CloudWatchCoutMessageFormatter {}Expand description
A MessageFormatter that serializes log messages into a single-line JSON format.
This formatter is specifically designed for AWS CloudWatch Logs when running in
environments like AWS Lambda, ECS, or Fargate, where stdout is automatically
captured and ingested as structured logs.
§Output Format
{"level":"INFO","msg":"Your log message here"}Implementations§
Source§impl CloudWatchCoutMessageFormatter
impl CloudWatchCoutMessageFormatter
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new instance of CloudWatchCoutMessageFormatter.
Trait Implementations§
Source§impl Default for CloudWatchCoutMessageFormatter
impl Default for CloudWatchCoutMessageFormatter
Source§fn default() -> CloudWatchCoutMessageFormatter
fn default() -> CloudWatchCoutMessageFormatter
Returns the “default value” for a type. Read more
Source§impl MessageFormatter for CloudWatchCoutMessageFormatter
impl MessageFormatter for CloudWatchCoutMessageFormatter
Auto Trait Implementations§
impl Freeze for CloudWatchCoutMessageFormatter
impl RefUnwindSafe for CloudWatchCoutMessageFormatter
impl Send for CloudWatchCoutMessageFormatter
impl Sync for CloudWatchCoutMessageFormatter
impl Unpin for CloudWatchCoutMessageFormatter
impl UnwindSafe for CloudWatchCoutMessageFormatter
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.