From ce96271749b3db7b17149a2f665cd2a65b96a3e2 Mon Sep 17 00:00:00 2001 From: Abhilash Date: Tue, 19 Nov 2024 14:43:35 +0530 Subject: [PATCH] chore: update pino child --- packages/collector/src/logger.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/collector/src/logger.js b/packages/collector/src/logger.js index b4d35f7fbd..11bd58839a 100644 --- a/packages/collector/src/logger.js +++ b/packages/collector/src/logger.js @@ -31,7 +31,7 @@ const registry = {}; * @param {boolean} [isReInit] */ exports.init = function init(config, isReInit) { - if (config.logger && isPino(config.logger)) { + if (config.logger && typeof config.logger.child === 'function') { // A pino logger has been provided via config; create a child logger directly under it. parentLogger = config.logger.child({ module: 'instana-nodejs-logger-parent', @@ -42,7 +42,7 @@ exports.init = function init(config, isReInit) { parentLogger = config.logger; } else { // No custom logger has been provided; create a new pino logger as the parent logger for all loggers - parentLogger = pino({ + parentLogger = pino.child({ name: '@instana/collector', level: 'info', base: {