logdis-filter-timestamp
This is an officially supported http://logdis.io/ plugin.
A filter to add a timestamp field to the processed object. Can be either an ISO timestamp such as
2016-07-15T11:47:23.301Z
or an epoch (in ms) such as 1468583243301
.
Synopsis
Require logdis-core
and whatever other inputs and outputs you need:
const logdisCore = require('logdis-core')
const filterTimestamp = require('logdis-filter-timestamp')
const logdis = logdisCore()
logdis.filter(filterTimestamp({
fieldname : 'ts',
format : 'epoch',
}))
Options
There are two options:
fieldname
(string, required) - the fieldname to use for the timestampformat
(string) - only iso
or epoch
is allowed (default: iso
)
Author
Andrew Chilton:
License
ISC.
(Ends)