Compare commits

...

1 Commits

Author SHA1 Message Date
Taylor McKinnon 37cd9dfdda add time_ns field 2020-01-15 10:49:08 -08:00
1 changed files with 3 additions and 1 deletions

View File

@ -443,7 +443,9 @@ class RequestLogger {
* uses this field to generate ISO 8601 timestamp * uses this field to generate ISO 8601 timestamp
*/ */
if (fields.time === undefined) { if (fields.time === undefined) {
fields.time = Date.now(); const now = process.hrtime();
fields.time = now[0] * 1000;
fields.time_ns = now[1];
} }
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase