Struct aws_lambda_log_proxy::LogProxy
source · pub struct LogProxy {
pub stdout: Option<Processor>,
pub stderr: Option<Processor>,
pub disable_lambda_telemetry_log_fd: bool,
}
Fields§
§stdout: Option<Processor>
See Self::stdout
.
stderr: Option<Processor>
See Self::stderr
.
disable_lambda_telemetry_log_fd: bool
Implementations§
source§impl LogProxy
impl LogProxy
sourcepub fn stdout(self, builder: impl FnOnce(ProcessorBuilder) -> Processor) -> Self
pub fn stdout(self, builder: impl FnOnce(ProcessorBuilder) -> Processor) -> Self
Set the processor for stdout
.
By default there is no processor for stdout
.
§Examples
use aws_lambda_log_proxy::{LogProxy, Sink};
let sink = Sink::stdout();
LogProxy::default().stdout(|p| p.sink(sink));
sourcepub fn stderr(self, builder: impl FnOnce(ProcessorBuilder) -> Processor) -> Self
pub fn stderr(self, builder: impl FnOnce(ProcessorBuilder) -> Processor) -> Self
Set the processor for stderr
.
By default there is no processor for stderr
.
§Examples
use aws_lambda_log_proxy::{LogProxy, Sink};
let sink = Sink::stdout();
LogProxy::default().stderr(|p| p.sink(sink));
sourcepub fn disable_lambda_telemetry_log_fd(self, disable: bool) -> Self
pub fn disable_lambda_telemetry_log_fd(self, disable: bool) -> Self
Remove the _LAMBDA_TELEMETRY_LOG_FD
environment variable for the handler process
to prevent logs from being written to other file descriptors.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LogProxy
impl !RefUnwindSafe for LogProxy
impl Send for LogProxy
impl !Sync for LogProxy
impl Unpin for LogProxy
impl !UnwindSafe for LogProxy
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