@universityofwarwick/log4js-node-clogs
v0.1.1
Published
Logstash appender for Warwick logstash
Downloads
2
Keywords
Readme
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://[email protected]/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.