You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently this library logs using console methods.
We're using structured logging in JSON using a library (Pino but that's not relevant here) in all of our applications, including AWS Lambda functions. Using this library currently results in unstructured log statements in our log aggregation which makes queries difficult.
I'd suggest adding a logger parameter to an options object and then calling that instead of console, defaulting to console if none is provided.
e.g.
serverless(handler,{logger});
where logger has the same interface as console.
The text was updated successfully, but these errors were encountered:
Currently this library logs using
console
methods.We're using structured logging in JSON using a library (Pino but that's not relevant here) in all of our applications, including AWS Lambda functions. Using this library currently results in unstructured log statements in our log aggregation which makes queries difficult.
I'd suggest adding a
logger
parameter to anoptions
object and then calling that instead ofconsole
, defaulting toconsole
if none is provided.e.g.
where
logger
has the same interface asconsole
.The text was updated successfully, but these errors were encountered: