Replies: 2 comments 2 replies
-
Since every HTTP request module can be different in how this information is returned (unless you are using core Node), it would be hard to include an example. LambdaLog is a generic logger which will allow you to pass any information you wish into it. With a typical Node response object ( const ip = res.socket.remoteAddress; and you can get the const forwardedFor = res.headers['x-forwarded-for']; I hope that helps! |
Beta Was this translation helpful? Give feedback.
-
When the logger isn't global, it's quite the PITA to pass the logger around as an argument, right? https://github.com/kaihendry/lambda-test/blob/ea3c7a55a3b8854aae742f468e92ae6008265f61/index.js#L33 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Would be cool if there was a prescribed example to get a http response captured like so:
For example how best to capture the ip? x-forwarded-for?
The status is in a well known location, etc.
Beta Was this translation helpful? Give feedback.
All reactions