0.1.0 • Published 9 years ago
logdis-filter-timestamp v0.1.0
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()
// inputs ...
logdis.filter(filterTimestamp({
fieldname : 'ts',
format : 'epoch',
}))
// outputs ...Options
There are two options:
fieldname(string, required) - the fieldname to use for the timestampformat(string) - onlyisoorepochis allowed (default:iso)
Author
Andrew Chilton:
License
ISC.
(Ends)
0.1.0
9 years ago