What's a good logging package for a Meteor app?

Here’s my wishlist of what I’d like to see:

  • Integrated with a babel plugin that would strip disabled logging statements from the code. That way I could have lots of debug logs in development and not bloat my production code.
  • I’d like some logs to be sent to the server where they can be recorded. Ideally via websocket or some similar async mechanism.
  • Ideally, log recording would be done in batches every few minutes or on page leave (logging on mobile can be a battery-killer if you are constantly pinging the server).
  • Log entries would be JSON objects rather than strings, making it easy to process them later.

Any suggestions?

winston is used a lot in npm and it is what we are using. Supports ability to send to many storage sources including MongoDB, JSON messages, etc.

Also, How to do realtime logging in Meteor? and https://meteorhacks.com/logging-support-for-meteor.html

2 Likes

Nice, that looks a lot like what I am looking for.

Here is a logging and metrics wrapper using winston and papertrail for meteor https://github.com/superlumen/meteor-logging.

1 Like