Skip to content

Commit

Permalink
Merge pull request #29 from pinojs/working-pretty-print-again
Browse files Browse the repository at this point in the history
Restored prettyPrint support
  • Loading branch information
mcollina committed Nov 13, 2017
2 parents 52f4efb + ee2ba18 commit 8715e64
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
5 changes: 1 addition & 4 deletions example.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ async function start () {
}
})

// the logger is available in server.app
server.app.logger.warn('Pino is registered')

// also as a decorated API
// as a decorated API
server.logger().info('another way for accessing it')

// and through Hapi standard logging system
Expand Down
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ async function register (server, options) {
var stream = options.stream || process.stdout

if (options.prettyPrint) {
// pino has a similar logic that works slightly different
// we must disable that
delete options.prettyPrint
var pretty = pino.pretty()
pretty.pipe(stream)
stream = pretty
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
"code": "^5.1.2",
"coveralls": "^3.0.0",
"flush-write-stream": "^1.0.0",
"hapi": "^17.0.0-rc10",
"hapi": "^17.0.0",
"lab": "^15.0.0",
"make-promises-safe": "^1.1.0",
"pre-commit": "^1.1.2",
"split2": "^2.2.0",
"standard": "^10.0.3"
},
"dependencies": {
"pino": "^4.9.0"
"pino": "^4.10.0"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 8715e64

Please sign in to comment.