mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
ff7be7696c
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
24 lines
490 B
TypeScript
24 lines
490 B
TypeScript
/* eslint-disable no-console */
|
|
|
|
import { Logger } from '../../lib/logger';
|
|
|
|
let muteError = false;
|
|
|
|
function noLoggerProvider(): Logger {
|
|
// do something with the name
|
|
return {
|
|
debug: () => {},
|
|
info: () => {},
|
|
warn: () => {},
|
|
error: muteError ? () => {} : console.error,
|
|
fatal: console.error,
|
|
};
|
|
}
|
|
|
|
noLoggerProvider.setMuteError = (mute) => {
|
|
muteError = mute;
|
|
};
|
|
|
|
module.exports = noLoggerProvider;
|
|
export default noLoggerProvider;
|