Get log data as json over tcp from forwardho servers. commit the data to log files unique to name and host. rotate and gzip files based on configured interval. Watch line events to publish data to stats or an event bus.
this server prefers global. it is configured with substacks confuse and prefers the most local tailreceiver.json file to your current working directory
$>npm install -g tailreceiver$>tailreceiverserver listening
var tailreceiver = ;var server = ;server;
- returns tail receiver server
- miliseconds how often files should be rotated. files are prefixed with YYYMMDD(-NUM) num is optional which is the number rotation that day
- size in bytes that files will be to trigger rotation.
- the port to listen for log connections on
- the directory to write log files too
- an event with a json object that came from a remote server.
lineObject client provided fields
- the line of data. provided by the client defaults to undefined
- the name of the file provided by the remote server. defaults to /unknown.log
- the time the line fo data was created on the remote server. if not populated set to Date.now()
server set fields
- the remote ip that gave us the data
- the report port
- when we got it
- the name of the log file that it was added to
the client can add more fields the default behavior is to add server side fields to the object provided by the client.
let me know if you find any issues or this package is useful