@hyperwatch/express-logger

3.1.0 • Public • Published

Hyperwatch Express Logger

An Express.js middleware to log HTTP requests to Hyperwatch and compatible software.

Install

npm install --save @hyperwatch/express-logger

Usage

Using the Syslog protocol

On Hyperwatch side, make sure you have a Syslog input that parse logs in the JSON standard format.

Then:

const express = require('express')
const hyperwatchExpressLogger = require('@hyperwatch/express-logger')

const app = express()

app.use(hyperwatchExpressLogger('syslog', '0.0.0.0', 1516)

Using the HTTP protocol

On Hyperwatch side, make sure you have an HTTP input that parse logs in the JSON standard format.

Then:

const express = require('express')
const hyperwatchExpressLogger = require('@hyperwatch/express-logger')

const app = express()

app.use(hyperwatchExpressLogger('http', 'http://0.0.0.0:3000/input/log'))

Using the Websocket protocol

On Hyperwatch side, make sure you have a WebSocket input that parse logs in the JSON standard format.

const express = require('express')
const hyperwatchExpressLogger = require('@hyperwatch/express-logger')

const app = express()

app.use(hyperwatchExpressLogger('websocket', 'ws://0.0.0.0:3000/input/log'))

License

Apache License, version 2

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.1.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 3.1.0
    1
  • 3.0.0
    2

Package Sidebar

Install

npm i @hyperwatch/express-logger

Weekly Downloads

1

Version

3.1.0

License

Apache-2.0

Unpacked Size

18.5 kB

Total Files

5

Last publish

Collaborators

  • znarf