keboola/serverless-papertrail-logging

Configurable formatLog function

Opened this issue · 0 comments

Great package. I've found it odd that the logs output by this package don't contain the function name. Would be helpful if the formatLog function used to output the log format was configurable.

I would imagine it being as straightforward as an additional parameter in serverless.yml:

papertrail: { formatFunction: "/my-format-function.js" }

In which case, the value of this parameter is a path to a file with an exported function that has access to the "event" of each function log.