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 Compare versions

Comparing version 0.6.3 to 0.6.4

test/log.test.js

6

CHANGES.md
# bunyan Changelog
## bunyan 0.6.4
- [issue #5] Fix `log.info() -> boolean` to work properly. Previous all were
returning false. Ditto all trace/debug/.../fatal methods.
## bunyan 0.6.3

@@ -4,0 +10,0 @@

26

lib/bunyan.js

@@ -7,3 +7,3 @@ /*

var VERSION = "0.6.3";
var VERSION = "0.6.4";

@@ -673,4 +673,4 @@ // Bunyan log format version. This becomes the 'v' field on all log records.

if (arguments.length === 0) { // `log.trace()`
return (this.level <= TRACE);
} else if (this.level > TRACE) {
return (this._level <= TRACE);
} else if (this._level > TRACE) {
return;

@@ -713,4 +713,4 @@ } else if (arguments[0] instanceof Error) {

if (arguments.length === 0) { // `log.debug()`
return (this.level <= DEBUG);
} else if (this.level > DEBUG) {
return (this._level <= DEBUG);
} else if (this._level > DEBUG) {
return;

@@ -753,4 +753,4 @@ } else if (arguments[0] instanceof Error) {

if (arguments.length === 0) { // `log.info()`
return (this.level <= INFO);
} else if (this.level > INFO) {
return (this._level <= INFO);
} else if (this._level > INFO) {
return;

@@ -793,4 +793,4 @@ } else if (arguments[0] instanceof Error) {

if (arguments.length === 0) { // `log.warn()`
return (this.level <= WARN);
} else if (this.level > WARN) {
return (this._level <= WARN);
} else if (this._level > WARN) {
return;

@@ -833,4 +833,4 @@ } else if (arguments[0] instanceof Error) {

if (arguments.length === 0) { // `log.error()`
return (this.level <= ERROR);
} else if (this.level > ERROR) {
return (this._level <= ERROR);
} else if (this._level > ERROR) {
return;

@@ -873,4 +873,4 @@ } else if (arguments[0] instanceof Error) {

if (arguments.length === 0) { // `log.fatal()`
return (this.level <= FATAL);
} else if (this.level > FATAL) {
return (this._level <= FATAL);
} else if (this._level > FATAL) {
return;

@@ -877,0 +877,0 @@ } else if (arguments[0] instanceof Error) {

{
"name": "bunyan",
"version": "0.6.3",
"version": "0.6.4",
"description": "a JSON Logger library for node.js servers",

@@ -5,0 +5,0 @@ "main": "./lib/bunyan.js",

@@ -12,4 +12,4 @@ Bunyan -- a JSON Logger for node.js servers.

Basic functionality there. Still a fair amount of planned work... most
importantly the clarifying of required and suggested fields.
Basic functionality there. Still a fair amount of planned work, but I'm using
it for some production services.

@@ -39,9 +39,13 @@ Currently supports node 0.4+, but I'll probably make the jump to node 0.6+ as a

log.info(); // Returns a boolean: is the "info" level enabled?
log.info(err); // Log an `Error` instance, adds "err" key with exception details
// (including the stack) and sets "msg" to the exception message.
// A special case, b/c logging errors should be easy.
log.info('hi'); // Log a simple string message.
log.info('hi'); // Log a simple string message.
log.info('hi %s', bob, anotherVar); // Uses `util.format` for msg formatting.
log.info({foo: 'bar'}, 'hi'); // Adds "foo" field to log record.
log.info(err); // Special case to log an `Error` instance, adds "err"
// key with exception details (including the stack) and
// sets "msg" to the exception message.
log.info(err, 'more on this: %s', more);
// ... or you can specify the "msg".

@@ -48,0 +52,0 @@ ## bunyan tool

Sorry, the diff of this file is not supported yet

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