diff --git a/src/apps.js b/src/apps.js index a3dce5627..5678af737 100644 --- a/src/apps.js +++ b/src/apps.js @@ -506,7 +506,12 @@ function getLogs(appId, lines, follow, callback) { if (!obj) return undefined; var source = obj.CONTAINER_NAME.slice(app.id.length + 1); - return JSON.stringify({ timestamp: obj.__REALTIME_TIMESTAMP, message: obj.MESSAGE, source: source || 'main' }); + return JSON.stringify({ + realtimeTimestamp: obj.__REALTIME_TIMESTAMP, + monotonicTimestamp: obj.__MONOTONIC_TIMESTAMP, + message: obj.MESSAGE, + source: source || 'main' + }); }); transformStream.close = cp.kill.bind(cp, 'SIGKILL'); // closing stream kills the child process diff --git a/src/routes/apps.js b/src/routes/apps.js index ca8e465a2..23b3c4db2 100644 --- a/src/routes/apps.js +++ b/src/routes/apps.js @@ -309,7 +309,7 @@ function getLogStream(req, res, next) { res.on('close', logStream.close); logStream.on('data', function (data) { var obj = JSON.parse(data); - res.write(sse(obj.timestamp, JSON.stringify(obj))); // send timestamp as id + res.write(sse(obj.monotonicTimestamp, JSON.stringify(obj))); // send timestamp as id }); logStream.on('end', res.end.bind(res)); logStream.on('error', res.end.bind(res, null));