Skip to content

Commit

Permalink
fix lambda-extension README (#511)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
greenwoodcm authored Aug 12, 2022
1 parent 9119e5d commit 62660df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lambda-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 62660df

Please sign in to comment.