bunyan-debug-stream
Advanced tools
Comparing version 1.1.1 to 2.0.0
@@ -218,3 +218,10 @@ // Generated by CoffeeScript 1.9.3 | ||
prefixes = prefixes.length > 0 ? "[" + (prefixes.join(',')) + "] " : ''; | ||
date = this._showDate ? (dateToString((ref6 = entry.time) != null ? ref6 : new Date())) + " " : ''; | ||
date = void 0; | ||
if (this._showDate && typeof this._showDate === 'function') { | ||
date = (this._showDate(entry.time, entry)) + " "; | ||
} else if (this._showDate) { | ||
date = (dateToString((ref6 = entry.time) != null ? ref6 : new Date())) + " "; | ||
} else { | ||
date = ''; | ||
} | ||
processStr = ""; | ||
@@ -221,0 +228,0 @@ if (this.options.showProcess) { |
{ | ||
"name": "bunyan-debug-stream", | ||
"version": "1.1.1", | ||
"version": "2.0.0", | ||
"author": "Jason Walton <dev@lucid.thedreaming.org> (https://github.com/jwalton)", | ||
@@ -25,10 +25,12 @@ "keywords": [ | ||
"bunyan": "^1.8.12", | ||
"chai": "^1.10.0", | ||
"coffee-coverage": "^0.6.2", | ||
"chai": "^4.1.2", | ||
"coffee-coverage": "^2.0.1", | ||
"coffee-script": "^1.8.0", | ||
"coveralls": "^2.11.2", | ||
"istanbul": "^0.3.16", | ||
"coveralls": "^3.0.2", | ||
"istanbul": "^0.4.5", | ||
"longjohn": "^0.2.4", | ||
"mocha": "^2.1.0", | ||
"semantic-release": "^15.6.3" | ||
"mocha": "^5.2.0", | ||
"semantic-release": "^15.6.3", | ||
"stream-to-string": "^1.1.0", | ||
"through2": "^2.0.3" | ||
}, | ||
@@ -35,0 +37,0 @@ "peerDependencies": { |
@@ -172,2 +172,10 @@ [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) | ||
You may also specify a `function(time, entry)` here to generate a custom date string: | ||
```js | ||
{ | ||
showDate: (time) => return time.toISOString() | ||
} | ||
``` | ||
### showPid | ||
@@ -205,3 +213,3 @@ | ||
metadata objects (also known as extra fields) to the log. However, this option does not apply to properties | ||
that have specific prefixer or stringifier handlers. | ||
that have specific prefixer or stringifier handlers. | ||
For example, if you have `foo` stringifier and arbitrary field `extraField: 1`, like below: | ||
@@ -208,0 +216,0 @@ |
Sorry, the diff of this file is not supported yet
30473
425
278
12