diff --git a/.changeset/clean-beds-wash.md b/.changeset/clean-beds-wash.md new file mode 100644 index 000000000..3bbebc4d7 --- /dev/null +++ b/.changeset/clean-beds-wash.md @@ -0,0 +1,5 @@ +--- +'@verdaccio/logger-commons': patch +--- + +chore(logger): avoid message if level remains the same diff --git a/packages/logger/logger-commons/src/logger.ts b/packages/logger/logger-commons/src/logger.ts index 85bf409fd..e1f99594f 100644 --- a/packages/logger/logger-commons/src/logger.ts +++ b/packages/logger/logger-commons/src/logger.ts @@ -93,7 +93,10 @@ export function createLogger( /* eslint-disable */ /* istanbul ignore next */ if (process.env.DEBUG) { - logger.on('level-change', (lvl, val, prevLvl, prevVal) => { + logger.on('level-change', (lvl, val, prevLvl, prevVal, instance) => { + if (logger !== instance) { + return; + } debug('%s (%d) was changed to %s (%d)', lvl, val, prevLvl, prevVal); }); }