datalogd.plugins.timestamp_datafilter module

class datalogd.plugins.timestamp_datafilter.TimeStampDataFilter(sinks=[])[source]

Bases: datalogd.DataFilter

Add or update a timestamp field to data using the current system clock.

receive(data)[source]

Accept the provided data and add a timestamp field.

If data, or elements in the data list are dicts, then a “timestamp” field will be added. Otherwise, the data entries will be converted to a dict with the old entry stored under a “value” field.

Parameters:data – Data to add a timestamp to.