Socket
Book a DemoInstallSign in
Socket

@hyperwatch/express-logger

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hyperwatch/express-logger

Express.js middleware to log HTTP requests to Hyperwatch.

latest
Source
npmnpm
Version
3.1.0
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 21 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts