bunyan-rollbar
If you're using Bunyan for logging, this custom stream can be used to send your error logs to Rollbar.
Example
var bunyan = var bunyanRollbar = // Tested with v2.1.0 of rollbar// You can pass in your own version of rollbarvar Rollbar = var rollbar = 'POST_SERVER_ITEM_ACCESS_TOKEN' // We strongly recommend you patch Bunyan's standard serializers. See the notes below.// This will *mutate* bunyan.stdSerializers.{err,req}.bunyanstdSerializersreq = bunyanRollbarbunyanstdSerializerserr = bunyanRollbar var logger = bunyan
Serializers
If you plan to use Bunyan's standard
serializers, it's
recommended you use the standard serializers from this library instead. You
should also overwrite bunyan.stdSerializers.err
with the version from this
library. The serializers provided by this library include all the same standard
serializers as Bunyan, but are modified to retain the original error and
request objects so Rollbar can apply its own custom processing to those
specific types of objects.
// OverridebunyanstdSerializerserr = bunyanRollbarstdSerializerserr;var logger = bunyan