Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logging functionality #20

Closed
jthomerson opened this issue Feb 26, 2019 · 2 comments
Closed

Add logging functionality #20

jthomerson opened this issue Feb 26, 2019 · 2 comments
Assignees
Milestone

Comments

@jthomerson
Copy link
Member

Probably something similar to https://github.com/jeremydaly/lambda-api#logging

@jthomerson jthomerson added this to the 1.0.0 milestone Feb 26, 2019
yokuze added a commit to yokuze/lambda-express that referenced this issue Mar 5, 2019
@yokuze
Copy link
Contributor

yokuze commented Mar 5, 2019

We decided that the standard log object will include these fields:

  • level
  • msg
  • data

When the log level is debug, or something more verbose like trace, then these fields are also added:

  • timer - the time, in milliseconds, since the start of the Lambda function request
  • remaining - the time, in milliseconds, left until the Lambda function times out
  • int - Interface. The type of Lambda event that triggered the request. One of APIGW or ALB

Here are some other fields we considered, but decided were not necessary or that we won't add at this time:

  • time / id - not needed because they’re in the CloudWatch output
  • function - not needed because each function (typically) has its own log stream
  • memory - not needed because it’s logged in the execution report
  • route / method - come back to this later
  • sample - we can revisit when we add sampling (Consider adding support for sampling to logger #26)

yokuze added a commit to yokuze/lambda-express that referenced this issue Mar 5, 2019
jthomerson pushed a commit to yokuze/lambda-express that referenced this issue Mar 25, 2019
yokuze added a commit to yokuze/lambda-express that referenced this issue Mar 25, 2019
jthomerson pushed a commit to yokuze/lambda-express that referenced this issue Mar 25, 2019
jthomerson added a commit that referenced this issue Mar 25, 2019
@yokuze
Copy link
Contributor

yokuze commented Mar 25, 2019

This was added with #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants