Comparing version 6.2.0 to 6.2.1
@@ -349,3 +349,3 @@ # API | ||
<a id="destination"></a> | ||
### `destination` (SonicBoom | WritableStream | String) | ||
### `destination` (SonicBoom | WritableStream | String | Object) | ||
@@ -372,2 +372,5 @@ Default: `pino.destination(1)` (STDOUT) | ||
const fileLogger = require('pino')('/log/path') | ||
// Asynchronous logging | ||
const fileLogger = pino(pino.destination({ dest: '/log/path', sync: false })) | ||
``` | ||
@@ -374,0 +377,0 @@ |
@@ -10,2 +10,14 @@ # Asynchronous Logging | ||
```js | ||
const pino = require('pino') | ||
const logger = pino(pino.destination({ | ||
dest: './my-file', // omit for stdout | ||
minLength: 4096, // Buffer before writing | ||
sync: false // Asynchronous logging | ||
})) | ||
``` | ||
* See [`pino.destination`](/docs/api.md#pino-destination) | ||
* `pino.destination` is implemented on [`sonic-boom` ⇗](https://github.com/mcollina/sonic-boom). | ||
## Caveats | ||
@@ -12,0 +24,0 @@ |
@@ -7,9 +7,10 @@ # Benchmarks | ||
BASIC benchmark averages | ||
Bunyan average: 549.042ms | ||
Winston average: 467.873ms | ||
Bole average: 201.529ms | ||
Debug average: 253.724ms | ||
LogLevel average: 282.653ms | ||
Pino average: 188.956ms | ||
PinoExtreme average: 108.809ms | ||
Bunyan average: 662.904ms | ||
Winston average: 564.752ms | ||
Bole average: 301.894ms | ||
Debug average: 361.052ms | ||
LogLevel average: 330.394ms | ||
Pino average: 246.336ms | ||
PinoAsync average: 129.507ms | ||
PinoNodeStream average: 276.479ms | ||
``` | ||
@@ -21,10 +22,9 @@ | ||
OBJECT benchmark averages | ||
BunyanObj average: 564.363ms | ||
WinstonObj average: 464.824ms | ||
BoleObj average: 230.220ms | ||
LogLevelObject average: 474.857ms | ||
PinoObj average: 201.442ms | ||
PinoUnsafeObj average: 202.687ms | ||
PinoExtremeObj average: 108.689ms | ||
PinoUnsafeExtremeObj average: 106.718ms | ||
BunyanObj average: 678.477ms | ||
WinstonObj average: 563.154ms | ||
BoleObj average: 364.748ms | ||
LogLevelObject average: 627.196ms | ||
PinoObj average: 237.543ms | ||
PinoAsyncObj average: 125.532ms | ||
PinoNodeStreamObj average: 310.614ms | ||
``` | ||
@@ -36,10 +36,9 @@ | ||
DEEPOBJECT benchmark averages | ||
BunyanDeepObj average: 5293.279ms | ||
WinstonDeepObj average: 9020.292ms | ||
BoleDeepObj average: 9169.043ms | ||
LogLevelDeepObj average: 15260.917ms | ||
PinoDeepObj average: 8467.807ms | ||
PinoUnsafeDeepObj average: 6159.227ms | ||
PinoExtremeDeepObj average: 8354.557ms | ||
PinoUnsafeExtremeDeepObj average: 6214.073ms | ||
BunyanDeepObj average: 1838.970ms | ||
WinstonDeepObj average: 3173.947ms | ||
BoleDeepObj average: 2888.894ms | ||
LogLevelDeepObj average: 7426.592ms | ||
PinoDeepObj average: 3074.177ms | ||
PinoAsyncDeepObj average: 2987.925ms | ||
PinoNodeStreamDeepObj average: 3459.883ms | ||
``` | ||
@@ -50,9 +49,8 @@ | ||
``` | ||
BunyanInterpolateExtra average: 778.408ms | ||
WinstonInterpolateExtra average: 627.956ms | ||
BoleInterpolateExtra average: 429.757ms | ||
PinoInterpolateExtra average: 316.043ms | ||
PinoUnsafeInterpolateExtra average: 316.809ms | ||
PinoExtremeInterpolateExtra average: 218.468ms | ||
PinoUnsafeExtremeInterpolateExtra average: 215.040ms | ||
BunyanInterpolateExtra average: 971.019ms | ||
WinstonInterpolateExtra average: 535.009ms | ||
BoleInterpolateExtra average: 575.668ms | ||
PinoInterpolateExtra average: 332.099ms | ||
PinoAsyncInterpolateExtra average: 209.552ms | ||
PinoNodeStreamInterpolateExtra average: 413.195ms | ||
``` | ||
@@ -59,0 +57,0 @@ |
@@ -6,9 +6,10 @@ # Web Frameworks | ||
+ [Pino with Fastify](#fastify) | ||
+ [Pino with Express](#express) | ||
+ [Pino with Hapi](#hapi) | ||
+ [Pino with Restify](#restify) | ||
+ [Pino with Koa](#koa) | ||
+ [Pino with Node core `http`](#http) | ||
+ [Pino with Nest](#nest) | ||
- [Web Frameworks](#web-frameworks) | ||
- [Pino with Fastify](#pino-with-fastify) | ||
- [Pino with Express](#pino-with-express) | ||
- [Pino with Hapi](#pino-with-hapi) | ||
- [Pino with Restify](#pino-with-restify) | ||
- [Pino with Koa](#pino-with-koa) | ||
- [Pino with Node core `http`](#pino-with-node-core-http) | ||
- [Pino with Nest](#pino-with-nest) | ||
@@ -41,3 +42,3 @@ <a id="fastify"></a> | ||
```sh | ||
npm install express-pino-logger | ||
npm install pino-http | ||
``` | ||
@@ -47,3 +48,3 @@ | ||
const app = require('express')() | ||
const pino = require('express-pino-logger')() | ||
const pino = require('pino-http')() | ||
@@ -60,3 +61,3 @@ app.use(pino) | ||
See the [express-pino-logger readme](http://npm.im/express-pino-logger) for more info. | ||
See the [pino-http readme](http://npm.im/pino-http) for more info. | ||
@@ -151,4 +152,2 @@ <a id="hapi"></a> | ||
### Koa | ||
```sh | ||
@@ -155,0 +154,0 @@ npm install koa-pino-logger |
{ | ||
"name": "pino", | ||
"version": "6.2.0", | ||
"version": "6.2.1", | ||
"description": "super fast, all natural json logger", | ||
@@ -5,0 +5,0 @@ "main": "pino.js", |
@@ -20,3 +20,3 @@ ![banner](pino-banner.png) | ||
* [Pretty Printing ⇗](/docs/pretty.md) | ||
* [Extreme Mode ⇗](/docs/extreme.md) | ||
* [Asynchronous Logging ⇗](/docs/asynchronous.md) | ||
* [Ecosystem ⇗](/docs/ecosystem.md) | ||
@@ -23,0 +23,0 @@ * [Legacy](/docs/legacy.md) |
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
301522