mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
chore(logger): avoid message if level remains the same (#4991)
This commit is contained in:
parent
dee09011cb
commit
15dddbe9e4
2 changed files with 9 additions and 1 deletions
5
.changeset/clean-beds-wash.md
Normal file
5
.changeset/clean-beds-wash.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@verdaccio/logger-commons': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
chore(logger): avoid message if level remains the same
|
|
@ -93,7 +93,10 @@ export function createLogger(
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/* istanbul ignore next */
|
/* istanbul ignore next */
|
||||||
if (process.env.DEBUG) {
|
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);
|
debug('%s (%d) was changed to %s (%d)', lvl, val, prevLvl, prevVal);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue