hapi-logr
Hapi plugin to integrate logr reporters
Installation
npm install hapi-logr
or
yarn add hapi-logr
Usage
const Hapi = require('@hapi/hapi');
const server = new Hapi.Server();
await server.register({
plugin: require('hapi-logr'),
options: { // logr-all options can be set here
unhandledRejection: true
uncaughtException: true
}
});
// Logr handles this
server.log(['start'], { message: 'server started', uri: server.info.uri });
A First + Third Project