Comparing version 4.0.4 to 5.0.0
@@ -6,2 +6,3 @@ 'use strict' | ||
const { stdSerializers } = pino | ||
const { serializersSym } = pino.symbols | ||
const nullLogger = require('abstract-logging') | ||
@@ -33,4 +34,9 @@ | ||
if (options.instance) { | ||
options.instance.serializers = Object.assign(options.serializers, options.instance.serializers) | ||
logger = options.instance | ||
const overrideDefaultErrorSerializer = (typeof options.serializers.err === 'function') && | ||
logger[serializersSym].err === stdSerializers.err | ||
logger[serializersSym] = Object.assign({}, options.serializers, logger[serializersSym]) | ||
if (overrideDefaultErrorSerializer) { | ||
logger[serializersSym].err = options.serializers.err | ||
} | ||
} else { | ||
@@ -37,0 +43,0 @@ options.stream = options.stream || process.stdout |
{ | ||
"name": "hapi-pino", | ||
"version": "4.0.4", | ||
"version": "5.0.0", | ||
"description": "Hapi plugin for the Pino logger ", | ||
@@ -9,3 +9,3 @@ "main": "index.js", | ||
"coveralls": "lab test.js -r lcov | coveralls", | ||
"test": "standard && lab test.js" | ||
"test": "standard && lab --timeout 100000 test.js" | ||
}, | ||
@@ -22,16 +22,16 @@ "keywords": [ | ||
"devDependencies": { | ||
"code": "^5.1.2", | ||
"coveralls": "^3.0.0", | ||
"flush-write-stream": "^1.0.0", | ||
"hapi": "^17.2.0", | ||
"lab": "^15.0.0", | ||
"code": "^5.2.0", | ||
"coveralls": "^3.0.2", | ||
"flush-write-stream": "^1.0.3", | ||
"hapi": "^17.5.3", | ||
"lab": "^15.5.0", | ||
"make-promises-safe": "^1.1.0", | ||
"pre-commit": "^1.1.2", | ||
"split2": "^2.2.0", | ||
"standard": "^10.0.3" | ||
"standard": "^11.0.0" | ||
}, | ||
"dependencies": { | ||
"abstract-logging": "^1.0.0", | ||
"hoek": "^5.0.2", | ||
"pino": "^4.15.3" | ||
"hoek": "^5.0.3", | ||
"pino": "^5.0.0" | ||
}, | ||
@@ -38,0 +38,0 @@ "repository": { |
@@ -8,10 +8,18 @@ # hapi-pino [](https://travis-ci.org/pinojs/hapi-pino) [](https://coveralls.io/github/pinojs/hapi-pino?branch=master) | ||
[__hapi-pino v2.0.0__](https://github.com/pinojs/hapi-pino/tree/v2.x.x) is the LTS line for Hapi v16. __hapi-pino v3+__ | ||
support Hapi v17 only. | ||
supports Hapi v17 only. The maximum version that can be used with Hapi v16 is Pino v4. | ||
## Install | ||
For Pino v5+ | ||
``` | ||
npm i hapi-pino --save | ||
npm install hapi-pino | ||
``` | ||
For Pino v4 and below: | ||
``` | ||
npm install hapi-pino@legacy #install hapi-pino v4.x.x | ||
``` | ||
## Usage | ||
@@ -125,2 +133,4 @@ | ||
``` | ||
- `[ignorePaths]` - Takes an array of string routes and disables logging for each. Useful for health checks or any route that does not need logging. E.g `['/health']` | ||
- `[level]` - Set the minumum level that Pino should log out. See [Level](https://github.com/pinojs/pino/blob/master/docs/API.md#level). For example, `{level: 'debug'}` would configure Pino to output all `debug` or higher events. | ||
@@ -127,0 +137,0 @@ <a name="serverdecorations"></a> |
Sorry, the diff of this file is not supported yet
40489
1231
169
+ Addedatomic-sleep@1.0.0(transitive)
+ Addedfast-redact@2.1.0(transitive)
+ Addedfast-safe-stringify@2.1.1(transitive)
+ Addedpino@5.17.0(transitive)
+ Addedquick-format-unescaped@3.0.3(transitive)
+ Addedsonic-boom@0.7.7(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedend-of-stream@1.4.4(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedfast-json-parse@1.0.3(transitive)
- Removedfast-safe-stringify@1.2.3(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedinherits@2.0.4(transitive)
- Removedisarray@1.0.0(transitive)
- Removedonce@1.4.0(transitive)
- Removedpino@4.17.6(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedpump@3.0.2(transitive)
- Removedquick-format-unescaped@1.1.2(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedsplit2@2.2.0(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedsupports-color@5.5.0(transitive)
- Removedthrough2@2.0.5(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedwrappy@1.0.2(transitive)
- Removedxtend@4.0.2(transitive)
Updatedhoek@^5.0.3
Updatedpino@^5.0.0