2020-04-14 22:29:11 +02:00
|
|
|
/* eslint-disable no-console */
|
|
|
|
|
2021-01-06 13:25:25 +01:00
|
|
|
let muteError = false;
|
2019-04-30 21:14:23 +02:00
|
|
|
|
2021-01-06 13:25:25 +01:00
|
|
|
function noLoggerProvider() {
|
2019-04-30 21:14:23 +02:00
|
|
|
// do something with the name
|
|
|
|
return {
|
|
|
|
debug: () => {},
|
|
|
|
info: () => {},
|
|
|
|
warn: () => {},
|
2021-01-06 13:25:25 +01:00
|
|
|
error: muteError ? () => {} : console.error,
|
2019-04-30 21:14:23 +02:00
|
|
|
};
|
2021-01-06 13:25:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
noLoggerProvider.setMuteError = mute => {
|
|
|
|
muteError = mute;
|
2019-04-30 21:14:23 +02:00
|
|
|
};
|
2021-01-06 13:25:25 +01:00
|
|
|
|
|
|
|
module.exports = noLoggerProvider;
|