cf-nodejs-logging-support
Advanced tools
Comparing version 6.1.0 to 6.1.1
@@ -12,3 +12,3 @@ const util = require("util"); | ||
const NS_PER_SEC = 1e9; | ||
const NS_PER_MS = 1e6; | ||
@@ -259,11 +259,10 @@ const LOG_TYPE = "log"; | ||
var initLog = function () { | ||
var time = process.hrtime(); | ||
var logObject = JSON.parse(initDummy); | ||
logObject.written_at = (new Date()).toJSON(); | ||
logObject.written_ts = time[0] * NS_PER_SEC + time[1]; | ||
var now = new Date(); | ||
logObject.written_at = now.toJSON(); | ||
logObject.written_ts = now.getTime() * NS_PER_MS; | ||
return logObject; | ||
}; | ||
@@ -270,0 +269,0 @@ |
{ | ||
"name": "cf-nodejs-logging-support", | ||
"version": "6.1.0", | ||
"version": "6.1.1", | ||
"description": "Logging tool for Cloud Foundry", | ||
@@ -34,3 +34,3 @@ "keywords": [ | ||
"rewire": "^4.0.1", | ||
"sinon": "^7.5.0", | ||
"sinon": "^9.0.0", | ||
"winston": "^3.2.1", | ||
@@ -37,0 +37,0 @@ "winston-transport": "^4.3.0" |
@@ -209,3 +209,3 @@ # Node.js Logging Support for Cloud Foundry | ||
### Check log severity level | ||
### Check log severity levels | ||
In some cases it can be useful to check if messages with a specific severity level would be logged. You can check if a logging level is active as follows: | ||
@@ -220,3 +220,3 @@ | ||
This can be useful, if preparing log messages requires some additional processing. There are convenient methods available for this feature: | ||
There are convenient methods available for this feature: | ||
```js | ||
@@ -223,0 +223,0 @@ var isDebugActive = log.isDebug(); |
101922