1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
unleash.unleash/test/fixtures/no-logger.js

20 lines
373 B
JavaScript
Raw Normal View History

/* eslint-disable no-console */
2021-01-06 13:25:25 +01:00
let muteError = false;
2021-01-06 13:25:25 +01:00
function noLoggerProvider() {
// do something with the name
return {
debug: () => {},
info: () => {},
warn: () => {},
2021-01-06 13:25:25 +01:00
error: muteError ? () => {} : console.error,
};
2021-01-06 13:25:25 +01:00
}
noLoggerProvider.setMuteError = mute => {
muteError = mute;
};
2021-01-06 13:25:25 +01:00
module.exports = noLoggerProvider;