Comparing version 1.0.0 to 1.1.0
@@ -21,5 +21,14 @@ const debug = require('debug')('pino-tiny:transformer') | ||
} else { | ||
const web = result.res && result.req ? `${result.req.method} ${result.req.url} (${result.res.statusCode})` : '' | ||
const icon = levels[result.level] ? levels[result.level].color(levels[result.level].icon) : '???' | ||
const output = `${icon} ${Moment(result.time).format('HH:mm:ss.SSS')} ${result.msg} ${Chalk.dim(web)}\n` | ||
const web = | ||
result.res && result.req | ||
? `${result.req.method} ${result.req.url} (${ | ||
result.res.statusCode | ||
}${result.responseTime ? `/${result.responseTime}ms` : ''})` | ||
: '' | ||
const icon = levels[result.level] | ||
? levels[result.level].color(levels[result.level].icon) | ||
: '???' | ||
const output = `${icon} ${Moment(result.time).format('HH:mm:ss.SSS')} ${ | ||
result.msg | ||
} ${Chalk.dim(web)}\n` | ||
cb(null, output) | ||
@@ -29,3 +38,9 @@ } | ||
result = false | ||
cb(new Error(`Unable to filter log: "${JSON.stringify(data)}". error: ${err.message}`)) | ||
cb( | ||
new Error( | ||
`Unable to filter log: "${JSON.stringify(data)}". error: ${ | ||
err.message | ||
}` | ||
) | ||
) | ||
} | ||
@@ -32,0 +47,0 @@ } |
{ | ||
"name": "pino-tiny", | ||
"version": "1.0.0", | ||
"description": "a very minimalistic output for pino logger", | ||
"version": "1.1.0", | ||
"description": "a very minimalist output for pino logger", | ||
"main": "lib/index.js", | ||
@@ -22,3 +22,3 @@ "bin": { | ||
"pino", | ||
"minimalistic", | ||
"minimalist", | ||
"log", | ||
@@ -52,2 +52,2 @@ "logger", | ||
} | ||
} | ||
} |
@@ -14,3 +14,3 @@ # pino-tiny | ||
![screen-shot](./screen-shot.jpg) | ||
![screen-shot](./screen-shot-v1.1.jpg) | ||
@@ -81,2 +81,4 @@ ## using it | ||
### New in v1.1 | ||
* timings added to web logs. |
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
146643
7
93
83