pino-devtools
Advanced tools
Comparing version 2.0.0 to 2.1.0
{ | ||
"name": "pino-devtools", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "A transport for viewing the logs in your favorite browser devtools", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -31,2 +31,3 @@ # pino-devtools | ||
- `--mode websocket`: the server mode, more information in the next section | ||
- `--tee`: also send the logs to `stdout` | ||
@@ -33,0 +34,0 @@ Note: the web socket port is `port + 1`. |
@@ -24,5 +24,6 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
host: '127.0.0.1', | ||
mode: MODE_WEBSOCKET, | ||
open: true, | ||
port: '3010', | ||
mode: MODE_WEBSOCKET, | ||
open: true | ||
tee: false | ||
}; | ||
@@ -37,2 +38,6 @@ | ||
return (record, enc, cb) => { | ||
if (options.tee) { | ||
console.log(record); | ||
} | ||
wsServer.broadcast(record); | ||
@@ -60,2 +65,6 @@ cb(); | ||
return (record, enc, cb) => { | ||
if (options.tee) { | ||
console.log(record); | ||
} | ||
BUFFER = _extends({}, BUFFER, { | ||
@@ -62,0 +71,0 @@ logs: BUFFER.logs.concat(record) |
382784
214
62