From b19b6c854b3a4d2ddcd061bee1cf1baf5881905a Mon Sep 17 00:00:00 2001 From: Christopher Greenwood Date: Fri, 12 Aug 2022 14:56:43 -0700 Subject: [PATCH] fix lambda-extension README the current example code doesn't work if you copy/paste it into a repo created with `cargo lambda new`, even if you change the `Cargo.toml` to pull in the `lambda-extension` crate. The default template doesn't bring in `tracing` with the `ansi` feature. This updates the README to have code that's more in line with the default template. --- lambda-extension/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lambda-extension/README.md b/lambda-extension/README.md index d26e62b7..0f132d75 100644 --- a/lambda-extension/README.md +++ b/lambda-extension/README.md @@ -29,7 +29,9 @@ async fn my_extension(event: LambdaEvent) -> Result<(), Error> { async fn main() -> Result<(), Error> { tracing_subscriber::fmt() .with_max_level(tracing::Level::INFO) - .with_ansi(false) + // disable printing the name of the module in every log line. + .with_target(false) + // disabling time is handy because CloudWatch will add the ingestion time. .without_time() .init();