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

pino

Package Overview
Dependencies
Maintainers
2
Versions
311
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 1.0.1 to 1.0.2

35

benchmarks/multiArg.js

@@ -11,2 +11,7 @@ 'use strict'

var plog = pino(dest)
var deep = require('../package.json')
deep.deep = Object.assign({}, deep)
deep.deep.deep = Object.assign({}, deep)
deep.deep.deep.deep = Object.assign({}, deep)
var max = 10

@@ -72,2 +77,8 @@ var blog = bunyan.createLogger({

},
function benchPinoInterpolate (cb) {
for (var i = 0; i < max; i++) {
plog.info('hello %s', 'world')
}
setImmediate(cb)
},
function benchBunyanInterpolateAll (cb) {

@@ -120,2 +131,26 @@ for (var i = 0; i < max; i++) {

setImmediate(cb)
},
function benchBunyanInterpolateDeep (cb) {
for (var i = 0; i < max; i++) {
blog.info('hello %j', deep)
}
setImmediate(cb)
},
function benchWinstonInterpolateDeep (cb) {
for (var i = 0; i < max; i++) {
winston.info('hello %j', deep)
}
setImmediate(cb)
},
function benchBoleInterpolateDeep (cb) {
for (var i = 0; i < max; i++) {
bole.info('hello %j', deep)
}
setImmediate(cb)
},
function benchPinoInterpolateDeep (cb) {
for (var i = 0; i < max; i++) {
plog.info('hello %j', deep)
}
setImmediate(cb)
}

@@ -122,0 +157,0 @@ ], 10000)

7

package.json
{
"name": "pino",
"version": "1.0.1",
"version": "1.0.2",
"description": "fast and simple logger",

@@ -42,7 +42,6 @@ "main": "pino.js",

"core-util-is": "^1.0.2",
"fast-json-parse": "^1.0.0",
"json-stringify-safe": "^5.0.1",
"quick-format": "^1.0.0",
"fast-safe-stringify": "^1.0.4",
"quick-format": "^2.0.0",
"split2": "^2.0.1"
}
}
'use strict'
var stringifySafe = require('json-stringify-safe')
var stringifySafe = require('fast-safe-stringify')
var format = require('quick-format')

@@ -26,3 +26,4 @@ var os = require('os')

var slowtime = opts.slowtime
var stringify = opts.safe !== false ? stringifySafe : JSON.stringify
var safe = opts.safe !== false
var stringify = safe ? stringifySafe : JSON.stringify
var name = opts.name

@@ -84,3 +85,3 @@ var level = opts.level

if (len > 1) {
msg = format(params)
msg = format(params, safe ? null : {lowres: true})
} else if (len) {

@@ -125,3 +126,3 @@ msg = params[0]

'"time":' + (slowtime ? '"' + (new Date()).toISOString() + '"' : Date.now()) + ',' +
'"v":' + 0
'"v":' + 1
}

@@ -128,0 +129,0 @@ }

@@ -26,3 +26,3 @@ 'use strict'

msg: msg,
v: 0
v: 1
})

@@ -52,3 +52,3 @@ }

hello: 'world',
v: 0
v: 1
})

@@ -72,3 +72,3 @@ }))

hello: 'world',
v: 0
v: 1
})

@@ -104,3 +104,3 @@ }))

stack: err.stack,
v: 0
v: 1
})

@@ -125,3 +125,3 @@ cb()

hello: 'world',
v: 0
v: 1
})

@@ -210,3 +210,3 @@ }))

msg: 'this is fatal',
v: 0
v: 1
})

@@ -250,3 +250,3 @@ cb()

hello: 'world',
v: 0
v: 1
})

@@ -270,3 +270,3 @@ cb()

hello: 'world',
v: 0
v: 1
})

@@ -297,3 +297,3 @@ cb()

msg: 'my request',
v: 0,
v: 1,
req: {

@@ -340,3 +340,3 @@ method: originalReq.method,

msg: 'my request',
v: 0,
v: 1,
req: {

@@ -379,3 +379,3 @@ method: originalReq.method,

msg: 'my response',
v: 0,
v: 1,
res: {

@@ -419,3 +419,3 @@ statusCode: originalRes.statusCode,

msg: 'my response',
v: 0,
v: 1,
res: {

@@ -469,3 +469,3 @@ statusCode: originalRes.statusCode,

msg: 'my request',
v: 0,
v: 1,
req: {

@@ -472,0 +472,0 @@ method: originalReq.method,

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