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 3.1.1 to 3.1.2

2

package.json
{
"name": "pino",
"version": "3.1.1",
"version": "3.1.2",
"description": "super fast, all natural json logger",

@@ -5,0 +5,0 @@ "main": "pino.js",

@@ -10,2 +10,3 @@ #! /usr/bin/env node

var levels = {
default: 'USERLVL',
60: 'FATAL',

@@ -74,2 +75,3 @@ 50: 'ERROR',

levelColors = {
default: ctx.white,
60: ctx.bgRed,

@@ -133,3 +135,7 @@ 50: ctx.red,

function asColoredLevel (value) {
return levelColors[value.level](levels[value.level])
if (levelColors.hasOwnProperty(value.level)) {
return levelColors[value.level](levels[value.level])
} else {
return levelColors.default(levels.default)
}
}

@@ -136,0 +142,0 @@ }

@@ -175,1 +175,15 @@ 'use strict'

})
test('accept customLogLevvel', function (t) {
t.plan(1)
var pretty = pino.pretty()
pretty.pipe(split(function (line) {
t.ok(line.indexOf('USERLVL') > 0, 'include custom level')
return line
}))
var instance = pino({level: 'testCustom', levelVal: 35}, pretty)
instance.testCustom('test message')
})
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