Comparing version 4.0.1 to 4.0.2
{ | ||
"name": "pino", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "super fast, all natural json logger", | ||
@@ -5,0 +5,0 @@ "main": "pino.js", |
@@ -113,2 +113,3 @@ 'use strict' | ||
Pino.prototype.trace = tools.genLog(levels.levels.trace) | ||
Pino.prototype.silent = tools.noop | ||
@@ -115,0 +116,0 @@ Object.defineProperty(Pino.prototype, 'levelVal', { |
@@ -149,2 +149,31 @@ 'use strict' | ||
test('silent is a noop', function (t) { | ||
var instance = pino({ | ||
level: 'silent' | ||
}, sink(function (chunk, enc, cb) { | ||
t.fail('no data should be logged') | ||
})) | ||
instance['silent']('hello world') | ||
t.end() | ||
}) | ||
test('silent stays a noop after level changes', function (t) { | ||
var noop = require('../lib/tools').noop | ||
var instance = pino({ | ||
level: 'silent' | ||
}, sink(function (chunk, enc, cb) { | ||
t.fail('no data should be logged') | ||
})) | ||
instance.level = 'trace' | ||
t.notEqual(instance[instance.level], noop) | ||
instance.level = 'silent' | ||
instance['silent']('hello world') | ||
t.is(instance[instance.level], noop) | ||
t.end() | ||
}) | ||
test('exposed levels', function (t) { | ||
@@ -151,0 +180,0 @@ t.plan(1) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
116939
2692