@instana/core
Advanced tools
Comparing version 1.87.0 to 1.88.0
{ | ||
"name": "@instana/core", | ||
"version": "1.87.0", | ||
"version": "1.88.0", | ||
"description": "Core library for Instana's Node.js packages", | ||
@@ -136,3 +136,3 @@ "main": "src/index.js", | ||
}, | ||
"gitHead": "3054ba9cd79922ea5d334647797175922656a946" | ||
"gitHead": "2bdf0ff3a2485b3a5dfe4e693c46057e34fdc870" | ||
} |
@@ -11,6 +11,18 @@ 'use strict'; | ||
exports.init = function() { | ||
requireHook.onFileLoad(/\/winston\/lib\/winston\/create-logger\.js/, instrumentCreateLogger); | ||
// Winston 2.x | ||
requireHook.onFileLoad(/\/winston\/lib\/winston\/logger\.js/, instrumentWinston2); | ||
// Winston >= 3.x | ||
requireHook.onFileLoad(/\/winston\/lib\/winston\/create-logger\.js/, instrumentWinston3); | ||
}; | ||
function instrumentCreateLogger(createLogger) { | ||
function instrumentWinston2(loggerModule) { | ||
if (typeof loggerModule.Logger !== 'function') { | ||
return loggerModule; | ||
} | ||
shimLogMethod(loggerModule.Logger.prototype); | ||
return loggerModule; | ||
} | ||
function instrumentWinston3(createLogger) { | ||
if (typeof createLogger !== 'function') { | ||
@@ -17,0 +29,0 @@ return createLogger; |
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
286123
7888