1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/test/fixtures/no-logger.ts
Christopher Kolstad ff7be7696c
fix: Stores as typescript and with interfaces. (#902)
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2021-08-12 15:04:37 +02:00

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;