adds timestamp to logged packet

This commit is contained in:
Todd Treece 2015-12-28 18:57:47 -05:00
parent 205f88bb19
commit c6a24ce39c

View file

@ -28,6 +28,7 @@ var mqtt = new mosca.Server({
mqtt.on('published', function(packet, client) {
packet.payload = packet.payload.toString();
packet.timestamp = new Date();
db.insert(packet);
});