mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
20 lines
373 B
JavaScript
20 lines
373 B
JavaScript
/* eslint-disable no-console */
|
|
|
|
let muteError = false;
|
|
|
|
function noLoggerProvider() {
|
|
// do something with the name
|
|
return {
|
|
debug: () => {},
|
|
info: () => {},
|
|
warn: () => {},
|
|
error: muteError ? () => {} : console.error,
|
|
};
|
|
}
|
|
|
|
noLoggerProvider.setMuteError = mute => {
|
|
muteError = mute;
|
|
};
|
|
|
|
module.exports = noLoggerProvider;
|