Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bunyan

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bunyan - npm Package Versions

1
12

0.22.1

Diff

Changelog

Source

0.22.1

  • [issue #111] Fix a crash when attempting to use bunyan -p on a platform without dtrace.

  • [issue #101] Fix a crash in bunyan rendering a record with unexpected "res.headers".

trentm
published 0.22.0 •

Changelog

Source

0.22.0

  • [issue #104] log.reopenFileStreams() convenience method to be used with external log rotation.
trentm
published 0.21.4 •

Changelog

Source

0.21.4

  • [issue #96] Fix bunyan to default to paging (with less) by default in node 0.10.0. The intention has always been to default to paging for node >=0.8.
trentm
published 0.21.3 •

Changelog

Source

0.21.3

  • [issue #90] Fix bunyan -p '*' breakage in version 0.21.2.
trentm
published 0.21.2 •

Changelog

Source

0.21.2

Note: Bad release. The switchrate change below broke bunyan -p '*' usage (see issue #90). Use 0.21.3 or later.

  • [issue #88] Should be able to efficiently combine "-l" with "-p *".

  • Avoid DTrace buffer filling up, e.g. like this:

      $ bunyan -p 42241 > /tmp/all.log
      dtrace: error on enabled probe ID 3 (ID 75795: bunyan42241:mod-87ea640:log-trace:log-trace): out of scratch space in action #1 at DIF offset 12
      dtrace: error on enabled probe ID 3 (ID 75795: bunyan42241:mod-87ea640:log-trace:log-trace): out of scratch space in action #1 at DIF offset 12
      dtrace: 138 drops on CPU 4
      ...
    

    From Bryan: "the DTrace buffer is filling up because the string size is so large... by increasing the switchrate, you're increasing the rate at which that buffer is emptied."

trentm
published 0.21.1 •

Changelog

Source

0.21.1

  • [pull #83] Support rendering 'client_res' key in bunyan CLI (by github.com/mcavage).
trentm
published 0.21.0 •

Changelog

Source

0.21.0

  • 'make check' clean, 4-space indenting. No functional change here, just lots of code change.
  • [issue #80, #82] Drop assert that broke using 'rotating-file' with a default period (by github.com/ricardograca).
trentm
published 0.20.0 •

Changelog

Source

0.20.0

  • [Slight backward incompatibility] Fix serializer bug introduced in 0.18.3 (see below) to only apply serializers to log records when appropriate.

    This also makes a semantic change to custom serializers. Before this change a serializer function was called for a log record key when that value was truth-y. The semantic change is to call the serializer function as long as the value is not undefined. That means that a serializer function should handle falsey values such as false and null.

  • Update to latest 'mv' dep (required for rotating-file support) to support node v0.10.0.

trentm
published 0.19.0 •

Changelog

Source

0.19.0

WARNING: This release includes a bug introduced in bunyan 0.18.3 (see below). Please upgrade to bunyan 0.20.0.

  • [Slight backward incompatibility] Change the default error serialization (a.k.a. bunyan.stdSerializers.err) to not serialize all additional attributes of the given error object. This is an open door to unsafe logging and logging should always be safe. With this change, error serialization will log these attributes: message, name, stack, code, signal. The latter two are added because some core node APIs include those fields (e.g. child_process.exec).

    Concrete examples where this has hurt have been the "domain" change necessitating 0.18.3 and a case where node-restify uses an error object as the response object. When logging the err and res in the same log statement (common for restify audit logging), the res.body would be JSON stringified as '[Circular]' as it had already been emitted for the err key. This results in a WTF with the bunyan CLI because the err.body is not rendered.

    If you need the old behaviour back you will need to do this:

      var bunyan = require('bunyan');
      var errSkips = {
          // Skip domain keys. `domain` especially can have huge objects that can
          // OOM your app when trying to JSON.stringify.
          domain: true,
          domain_emitter: true,
          domain_bound: true,
          domain_thrown: true
      };
      bunyan.stdSerializers.err = function err(err) {
         if (!err || !err.stack)
             return err;
         var obj = {
             message: err.message,
             name: err.name,
             stack: getFullErrorStack(err)
         }
         Object.keys(err).forEach(function (k) {
             if (err[k] !== undefined && !errSkips[k]) {
                 obj[k] = err[k];
             }
         });
         return obj;
       };
    
  • "long" and "bunyan" output formats for the CLI. bunyan -o long is the default format, the same as before, just called "long" now instead of the cheesy "paul" name. The "bunyan" output format is the same as "json-0", just with a more convenient name.

trentm
published 0.18.3 •

Changelog

Source

0.18.3

WARNING: This release introduced a bug such that all serializers are applied to all log records even if the log record did not contain the key for that serializer. If a logger serializer function does not handle being given undefined, then you'll get warnings like this on stderr:

bunyan: ERROR: This should never happen. This is a bug in <https://github.com/trentm/node-bunyan> or in this application. Exception from "foo" Logger serializer: Error: ...
    at Object.bunyan.createLogger.serializers.foo (.../myapp.js:20:15)
    at Logger._applySerializers (.../lib/bunyan.js:644:46)
    at Array.forEach (native)
    at Logger._applySerializers (.../lib/bunyan.js:640:33)
    ...

and the following junk in written log records:

"foo":"(Error in Bunyan log "foo" serializer broke field. See stderr for details.)"

Please upgrade to bunyan 0.20.0.

  • Change the bunyan.stdSerializers.err serializer for errors to exclude the "domain*" keys. err.domain will include its assigned members which can arbitrarily large objects that are not intended for logging.

  • Make the "dtrace-provider" dependency optional. I hate to do this, but installing bunyan on Windows is made very difficult with this as a required dep. Even though "dtrace-provider" stubs out for non-dtrace-y platforms, without a compiler and Python around, node-gyp just falls over.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc