pino-pretty
Advanced tools
Comparing version 2.3.0 to 2.4.0
@@ -123,3 +123,3 @@ 'use strict' | ||
var line = `[${log.time}]` | ||
var line = log.time ? `[${log.time}]` : '' | ||
@@ -132,3 +132,6 @@ const coloredLevel = levels.hasOwnProperty(log.level) | ||
} else { | ||
line = `${line} ${coloredLevel}` | ||
// If the line is not empty (timestamps are enabled) output it | ||
// with a space after it - otherwise output the empty string | ||
const lineOrEmpty = line && line + ' ' | ||
line = `${lineOrEmpty}${coloredLevel}` | ||
} | ||
@@ -135,0 +138,0 @@ |
{ | ||
"name": "pino-pretty", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "Prettifier for Pino log lines", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -279,3 +279,3 @@ 'use strict' | ||
const formatted = pretty(chunk.toString()) | ||
t.is(formatted, `[undefined] INFO (${pid} on ${hostname}): hello world\n`) | ||
t.is(formatted, `INFO (${pid} on ${hostname}): hello world\n`) | ||
cb() | ||
@@ -282,0 +282,0 @@ } |
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
219730
1029