diff --git a/docs/web.md b/docs/web.md index 40b7c6cf7..41dcf2ec8 100644 --- a/docs/web.md +++ b/docs/web.md @@ -70,7 +70,8 @@ npm install hapi-pino require('make-promises-safe') -const Hapi = require('hapi') +const Hapi = require('@hapi/hapi') +const Pino = require('hapi-pino'); async function start () { // Create a server with a host and port @@ -94,15 +95,10 @@ async function start () { } }) - await server.register({ - plugin: require('.'), - options: { - prettyPrint: process.env.NODE_ENV !== 'production' - } - }) + await server.register(Pino) // also as a decorated API - server.logger().info('another way for accessing it') + server.logger.info('another way for accessing it') // and through Hapi standard logging system server.log(['subsystem'], 'third way for accessing it')