Socket
Socket
Sign inDemoInstall

pino

Package Overview
Dependencies
Maintainers
4
Versions
310
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pino - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

2

package.json
{
"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)

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