Comparing version 2.11.0 to 2.12.0
{ | ||
"name": "pino", | ||
"version": "2.11.0", | ||
"version": "2.12.0", | ||
"description": "fast and simple logger", | ||
@@ -5,0 +5,0 @@ "main": "pino.js", |
@@ -49,2 +49,6 @@ #! /usr/bin/env node | ||
function isPinoLine (line) { | ||
return line.hasOwnProperty('hostname') && line.hasOwnProperty('pid') && (line.hasOwnProperty('v') && line.v === 1) | ||
} | ||
function pretty (opts) { | ||
@@ -83,3 +87,3 @@ var timeTransOnly = opts && opts.timeTransOnly | ||
if (parsed.err) { | ||
if (parsed.err || !isPinoLine(value)) { | ||
// pass through | ||
@@ -86,0 +90,0 @@ return line + '\n' |
@@ -84,1 +84,16 @@ 'use strict' | ||
}) | ||
test('handles missing time', function (t) { | ||
t.plan(1) | ||
var pretty = pino.pretty() | ||
var lines = [] | ||
pretty.pipe(split(function (line) { | ||
lines.push(line) | ||
return line | ||
})) | ||
pretty.write('{"hello":"world"}') | ||
pretty.end() | ||
t.deepEqual(lines, ['{"hello":"world"}'], 'preserved lines') | ||
}) |
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
588296
2241