pino-colada
Advanced tools
Comparing version 1.3.0 to 1.3.1
21
index.js
@@ -91,8 +91,9 @@ var prettyBytes = require('prettier-bytes') | ||
function formatMessage (obj) { | ||
if (obj.level === 'error') return chalk.dim.red(obj.message) | ||
if (obj.level === 'trace') return chalk.dim.white(obj.message) | ||
if (obj.level === 'warn') return chalk.dim.magenta(obj.message) | ||
if (obj.level === 'debug') return chalk.dim.yellow(obj.message) | ||
if (obj.level === 'fatal') return chalk.bgRed(obj.message) + nl + obj.stack | ||
if (obj.level === 'info' || obj.level === 'userlvl') return formatMessageName(obj.message) | ||
var msg = formatMessageName(obj.message) | ||
if (obj.level === 'error') return chalk.dim.red(msg) | ||
if (obj.level === 'trace') return chalk.dim.white(msg) | ||
if (obj.level === 'warn') return chalk.dim.magenta(msg) | ||
if (obj.level === 'debug') return chalk.dim.yellow(msg) | ||
if (obj.level === 'fatal') return chalk.bgRed(msg) + nl + obj.stack | ||
if (obj.level === 'info' || obj.level === 'userlvl') return chalk.green.dim(msg) | ||
} | ||
@@ -115,3 +116,3 @@ | ||
var elapsed = parseInt(elapsedTime, 10) | ||
var time = time > 9999 ? prettyMs(elapsed) : elapsed + 'ms' | ||
var time = prettyMs(elapsed) | ||
return chalk.gray(time) | ||
@@ -127,5 +128,5 @@ } | ||
function formatMessageName (message) { | ||
if (message === 'request') return chalk.dim.green('<--') | ||
if (message === 'response') return chalk.dim.green('-->') | ||
return chalk.dim.green(message) | ||
if (message === 'request') return '<--' | ||
if (message === 'response') return '-->' | ||
return message | ||
} | ||
@@ -132,0 +133,0 @@ |
{ | ||
"name": "pino-colada", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "cute ndjson logger for pino", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
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
192
55939