koa-logger
Advanced tools
Comparing version 3.0.0 to 3.0.1
3.0.1 / 2017-06-30 | ||
================== | ||
* Fixes error 'chalk[color] does not return function' when using custom (#61) | ||
3.0.0 / 2017-05-16 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -22,2 +22,3 @@ /** | ||
const colorCodes = { | ||
7: 'magenta', | ||
5: 'red', | ||
@@ -38,3 +39,3 @@ 4: 'yellow', | ||
// request | ||
const start = new Date() | ||
const start = Date.now() | ||
console.log(' ' + chalk.gray('<--') + | ||
@@ -96,3 +97,3 @@ ' ' + chalk.bold('%s') + | ||
const s = status / 100 | 0 | ||
const color = colorCodes[s] | ||
const color = colorCodes.hasOwnProperty(s) ? colorCodes[s] : 0 | ||
@@ -133,3 +134,3 @@ // get the human readable response length | ||
function time (start) { | ||
const delta = new Date() - start | ||
const delta = Date.now() - start | ||
return humanize(delta < 10000 | ||
@@ -136,0 +137,0 @@ ? delta + 'ms' |
@@ -5,3 +5,3 @@ { | ||
"repository": "koajs/logger", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"keywords": [ | ||
@@ -8,0 +8,0 @@ "koa", |
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
5882
114