Comparing version 3.0.1 to 3.0.2
{ | ||
"name": "pino", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "super fast, all natural json logger", | ||
@@ -5,0 +5,0 @@ "main": "pino.js", |
@@ -19,2 +19,3 @@ ![banner](pino-banner.png) | ||
* [How to use Pino with Koa](#koa) | ||
* [How to use Pino with `debug`](#debug) | ||
* [How do I rotate log files?](#rotate) | ||
@@ -776,3 +777,28 @@ * [How do I redact sensitive information?](#redact) | ||
<a name="debug"></a> | ||
## How to use Pino with `debug` | ||
The popular [`debug`](http://npm.im/debug) which | ||
used in many modules accross the ecosystem. | ||
The [`pino-debug`](http://github.com/pinojs/pino-debug) | ||
can captures calls to the `debug` loggers and run them | ||
through `pino` instead. This results in a 10x (20x in extreme mode) | ||
performance improvement, while logging out more information, in the | ||
usual JSON format. | ||
The quick start way to enable this is simply to install [`pino-debug`](http://github.com/pinojs/pino-debug) | ||
and preload it with the `-r` flag, enabling any `debug` logs with the | ||
`DEBUG` environment variable: | ||
```sh | ||
$ npm i --save pino-debug | ||
$ DEBUG=* node -r pino-debug app.js | ||
``` | ||
[`pino-debug`](http://github.com/pinojs/pino-debug) also offers fine grain control to map specific `debug` | ||
namespaces to `pino` log levels. See [`pino-debug`](http://github.com/pinojs/pino-debug) | ||
for more. | ||
<a name="rotate"></a> | ||
@@ -806,2 +832,5 @@ ## How do I rotate log files? | ||
<a name="redact"></a> | ||
@@ -808,0 +837,0 @@ ## How do I redact sensitive information?? |
@@ -243,3 +243,3 @@ 'use strict' | ||
function fnName (fn) { | ||
var rx = /^\s*function\s*([^\(]*)/i | ||
var rx = /^\s*function\s*([^(]*)/i | ||
var match = rx.exec(fn) | ||
@@ -246,0 +246,0 @@ return match && match[1] |
Sorry, the diff of this file is not supported yet
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
614145
1114