Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/firstandthird/hapi-logr

Hapi logging plugin using Logr
https://github.com/firstandthird/hapi-logr

hapi-plugin hapi-v17

Last synced: 3 days ago
JSON representation

Hapi logging plugin using Logr

Awesome Lists containing this project

README

        

hapi-logr



Test Status


Lint Status

NPM

Hapi plugin to integrate logr reporters

## Installation

```sh
npm install hapi-logr
```

_or_

```sh
yarn add hapi-logr
```

## Usage

```javascript
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](https://firstandthird.com) Project_