colorful-logging
Advanced tools
Comparing version 1.0.3 to 1.0.4
const chalk = require('chalk'); | ||
const processLogLine = require('./processLogLine'); | ||
const { | ||
inspect: { styles }, | ||
} = require('util'); | ||
module.exports = function error(value, colorFormatter, bgColorFormatter) { | ||
if (value instanceof Error) { | ||
console.error(processLogLine( | ||
value.stack, | ||
value.stack || value.message || value, | ||
colorFormatter || chalk.red, | ||
bgColorFormatter, | ||
)); | ||
)); | ||
} else { | ||
@@ -16,0 +12,0 @@ console.error(processLogLine( |
{ | ||
"name": "colorful-logging", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "A simple logging module with pleasing default colors and optional color arguments.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
3188
78