@universityofwarwick/log4js-node-clogs

0.1.1 • Public • Published

Warwick logstash appender for log4js

This is a simple appender for log4js to send log messages to CLogS (logs.warwick.ac.uk).

Installation

$ npm install git+ssh://git@repo.elab.warwick.ac.uk/shared/log4js-node-clogs.git

Usage

See the three example files.

The default category used for log4js access logs is 'web'. For the CLogS appender, we use 'request'. This allows us to format access logs appropriately for different appenders without overlap.

The parseExpress() method is used to generate access logs from Express.js. Set res.locals.user (and res.locals.realUser if your app supports masquerading) as objects with a getUsercode() method in order to pass these data through.

/@universityofwarwick/log4js-node-clogs/

    Package Sidebar

    Install

    npm i @universityofwarwick/log4js-node-clogs

    Weekly Downloads

    0

    Version

    0.1.1

    License

    UNLICENSED

    Unpacked Size

    15 kB

    Total Files

    8

    Last publish

    Collaborators

    • lk9100
    • nickhowes
    • flamingelk
    • warwick-goatee
    • warwick-glasses