aws / aws/aws-lambda-go

Don't output to stdout directly

Open
#512 2 comments 1 reaction 0 assignees View on GitHub
enhancement type/ux
Dominant language
Go
Stars
3.8k
Forks
578
Avg merge
8h 18m
Merged PRs (30d)
1

Description

**Is your feature request related to a problem? Please describe.**
When the handlers returns any non-nil error, `reportFailure` is called and it does a [raw log.Printf](https://github.com/aws/aws-lambda-go/blob/main/lambda/invoke_loop.go#L106) call, outputting a line in the standard go format like `2023/07/10 20:12:21 {"errorMessage":"error"}`, breaking our logs handling which expects all logs to be JSON.

**Describe the solution you'd like**
Libraries should not output to stdout, at least a logger should be configurable.

**Describe alternatives you've considered**

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.