cf-nodejs-logging-support
Advanced tools
Comparing version 6.5.2 to 6.5.3
@@ -55,2 +55,3 @@ const util = require("util"); | ||
var lastTimestamp = 0; | ||
@@ -296,5 +297,13 @@ // Initializes the core logger, including setup of environment var defined settings | ||
var now = new Date(); | ||
logObject.written_at = now.toJSON(); | ||
logObject.written_at = now.toJSON(); | ||
logObject.written_ts = now.getTime() * NS_PER_MS + (process.hrtime()[1] % 1000000); | ||
var lower = process.hrtime()[1] % NS_PER_MS | ||
var higher = now.getTime() * NS_PER_MS | ||
logObject.written_ts = higher + lower; | ||
//This reorders written_ts, if the new timestamp seems to be smaller | ||
// due to different rollover times for process.hrtime and now.getTime | ||
if(logObject.written_ts < lastTimestamp) | ||
logObject.written_ts += NS_PER_MS; | ||
lastTimestamp = logObject.written_ts; | ||
return logObject; | ||
@@ -301,0 +310,0 @@ }; |
{ | ||
"name": "cf-nodejs-logging-support", | ||
"version": "6.5.2", | ||
"version": "6.5.3", | ||
"description": "Logging tool for Cloud Foundry", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
116571
1684