Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump pino version from 6.0.0 to 7.0.0 #144

Merged
merged 6 commits into from Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/workflows/test.yml
Expand Up @@ -15,13 +15,8 @@ jobs:

strategy:
matrix:
node: [10, 12, 14]
hapi: ["@hapi/hapi@18", "@hapi/hapi@19", "@hapi/hapi@20"]
exclude:
- node: 10
hapi: "@hapi/hapi@19"
- node: 10
hapi: "@hapi/hapi@20"
node: [12, 14, 16]
hapi: ["@hapi/hapi@20"]

steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -6,7 +6,8 @@ post-processing.

## Supported Hapi versions

- hapi-pino v7.x and v8.x supports Hapi v18 and v19.
- hapi-pino v8.x supports Hapi v20. (Known to work on v18 and v19, not tested anymore.)
- hapi-pino v7.x supports Hapi v18 and v19.
- hapi-pino v6.x supports Hapi v17, v18 and v19
- hapi-pino v5.x supports Hapi v17 and v18
- hapi-pino v3.x
Expand Down
4 changes: 4 additions & 0 deletions index.js
Expand Up @@ -5,6 +5,7 @@ const pino = require('pino')
const { stdSerializers } = pino
const serializersSym = Symbol.for('pino.serializers')
const nullLogger = require('abstract-logging')
const getCallerFile = require('get-caller-file')

const levelTags = {
trace: 'trace',
Expand Down Expand Up @@ -46,6 +47,9 @@ async function register (server, options) {
logger[serializersSym].err = options.serializers.err
}
} else {
if (options.transport && !options.transport.caller) {
options.transport.caller = getCallerFile()
}
options.stream = options.stream || process.stdout
var stream = options.stream || process.stdout
logger = pino(options, stream)
Expand Down
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -21,7 +21,7 @@
"devDependencies": {
"@hapi/code": "^8.0.0",
"@hapi/hapi": "^20.0.0",
"@hapi/lab": "^23.0.0",
"@hapi/lab": "^24.3.2",
"coveralls": "^3.0.11",
"flush-write-stream": "^2.0.0",
"make-promises-safe": "^5.1.0",
Expand All @@ -32,7 +32,8 @@
"dependencies": {
"@hapi/hoek": "^9.0.0",
"abstract-logging": "^2.0.0",
"pino": "^6.0.0",
"get-caller-file": "^2.0.5",
"pino": "^7.0.0",
"pino-pretty": "^4.0.0"
},
"repository": {
Expand Down