Structured Logging library for node.js projects

Hi guys, what logger do people tend to use with node.js projects?

Perhaps there is some way to Github search for the answer?

I’m fine with console.error, console.warn etc from Console | Node.js v14.17.6 Documentation but I don’t know how to get that into Cloudwatch friendly JSON.

@hendry might want to check out GitHub - getndazn/dazn-lambda-powertools: Powertools (logger, HTTP client, AWS clients, middlewares, patterns) for Lambda functions. makes it quite nice to add structured logs to node based lambdas.

1 Like

@hendry internally in the Framework we’re now reconfiguring all logging with this library: GitHub - medikoo/log: Universal logging utility.

Check the docs and see if it can fit your needs

Thanks, I’m currently using and I’m OK with it.

Wish I could figure out how to log timestamps in local time and sort of helpers wrt EMF [1] would be nice!

[1] Specification: Embedded metric format - Amazon CloudWatch