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

pino

Package Overview
Dependencies
Maintainers
4
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 4.5.1 to 4.5.2

4

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

@@ -68,3 +68,3 @@ "main": "pino.js",

"pre-commit": "^1.2.2",
"snazzy": "^6.0.0",
"snazzy": "^7.0.0",
"standard": "^10.0.0",

@@ -71,0 +71,0 @@ "steed": "^1.1.3",

@@ -108,4 +108,4 @@ 'use strict'

line = (levelFirst)
? asColoredLevel(value) + ' [' + asISODate(value.time) + ']'
: '[' + asISODate(value.time) + '] ' + asColoredLevel(value)
? asColoredLevel(value) + ' ' + formatTime(value)
: formatTime(value, ' ') + asColoredLevel(value)

@@ -134,2 +134,15 @@ line += ' ('

function formatTime (value, after) {
after = after || ''
try {
if (!value || !value.time) {
return ''
} else {
return '[' + asISODate(value.time) + ']' + after
}
} catch (_) {
return ''
}
}
function asColoredLevel (value) {

@@ -136,0 +149,0 @@ if (levelColors.hasOwnProperty(value.level)) {

@@ -234,1 +234,19 @@ 'use strict'

})
test('works without time', function (t) {
t.plan(4)
var prettier = pretty()
prettier.pipe(split(function (line) {
t.ok(line.match(/.*hello world$/), 'end of line matches')
t.ok(line.match(/^INFO.*/), 'includes level')
t.ok(line.indexOf('' + process.pid) > 0, 'includes pid')
t.ok(line.indexOf('' + hostname) > 0, 'includes hostname')
return line
}))
var instance = pino({
timestamp: null
}, prettier)
instance.info('hello world')
})
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