Skip to content

Commit 62660df

Browse files
authored
fix lambda-extension README (#511)
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.
1 parent 9119e5d commit 62660df

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lambda-extension/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ async fn my_extension(event: LambdaEvent) -> Result<(), Error> {
2929
async fn main() -> Result<(), Error> {
3030
tracing_subscriber::fmt()
3131
.with_max_level(tracing::Level::INFO)
32-
.with_ansi(false)
32+
// disable printing the name of the module in every log line.
33+
.with_target(false)
34+
// disabling time is handy because CloudWatch will add the ingestion time.
3335
.without_time()
3436
.init();
3537

0 commit comments

Comments
 (0)