Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
Added timestamp to monitor-events
Browse files Browse the repository at this point in the history
  • Loading branch information
stefannilsson authored Jan 26, 2018
1 parent a9c0c29 commit c66c3cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions iothub-explorer-monitor-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ var monitorEvents = function () {
var from = eventData.annotations['iothub-connection-device-id'];
var raw = program.raw;
if (!deviceId || (deviceId && from === deviceId)) {
if (!raw) console.log('==== From: ' + from + ' ====');
if (!raw) console.log('==== From: \'' + from + '\' at \''+(new Date()).toISOString()+'\' ====');
if (eventData.body instanceof Buffer) {
console.log(eventData.body.toString());
} else if (typeof eventData.body === 'string') {
Expand Down Expand Up @@ -150,4 +150,4 @@ if (deviceId) {
}
else {
monitorEvents();
}
}

0 comments on commit c66c3cd

Please sign in to comment.