cf-nodejs-logging-support
Advanced tools
Comparing version 5.1.1 to 5.2.0
@@ -333,8 +333,11 @@ var util = require("util"); | ||
var req = this; | ||
if (req.logObject != null) { | ||
logObject.correlation_id = req.logObject.correlation_id; | ||
if (req.logObject.request_id != null) { | ||
logObject.request_id = req.logObject.request_id; | ||
var ctx = this; | ||
if (ctx.logObject != null) { | ||
logObject.correlation_id = ctx.logObject.correlation_id; | ||
if (ctx.logObject.tenant_id != null) { | ||
logObject.tenant_id = ctx.logObject.tenant_id; | ||
} | ||
if (ctx.logObject.request_id != null) { | ||
logObject.request_id = ctx.logObject.request_id; | ||
} | ||
} | ||
@@ -363,6 +366,6 @@ | ||
var getCorrelationId = function () { | ||
var req = this; | ||
if (req.logObject != null) { | ||
if (req.logObject.correlation_id != null) { | ||
return req.logObject.correlation_id; | ||
var ctx = this; | ||
if (ctx.logObject != null) { | ||
if (ctx.logObject.correlation_id != null) { | ||
return ctx.logObject.correlation_id; | ||
} | ||
@@ -375,6 +378,6 @@ } | ||
var setCorrelationId = function (correlationId) { | ||
var req = this; | ||
if (req.logObject != null) { | ||
var ctx = this; | ||
if (ctx.logObject != null) { | ||
if (uuidCheck.exec(correlationId)) { | ||
req.logObject.correlation_id = correlationId; | ||
ctx.logObject.correlation_id = correlationId; | ||
return true; | ||
@@ -483,3 +486,2 @@ } | ||
var bindDynLogLevel = function (token, req) { | ||
var payload = verifyAndDecodeJWT(token, dynLogLevelKey); | ||
@@ -486,0 +488,0 @@ |
@@ -286,2 +286,10 @@ var uuid = require("uuid/v4"); | ||
}, { | ||
name: "tenant_id", | ||
mandatory: true, | ||
source: { | ||
type: "header", | ||
name: "tenantid" | ||
}, | ||
default: "-" | ||
}, { | ||
name: "level", | ||
@@ -288,0 +296,0 @@ mandatory: true, |
{ | ||
"name": "cf-nodejs-logging-support", | ||
"version": "5.1.1", | ||
"version": "5.2.0", | ||
"description": "Logging tool for Cloud Foundry", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -191,2 +191,3 @@ # Node.js Logging Support for Cloud Foundry | ||
- request_id | ||
- tenant_id | ||
@@ -193,0 +194,0 @@ |
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
90056
1353
335