UNPKG

@johnf/react-native-owl

Version:
34 lines (29 loc) 886 B
"use strict"; export class Logger { constructor(isEnabled = false) { this.isEnabled = isEnabled; } /** Will only output when the debug flag in the config is on. */ info(message, ...optionalParams) { if (this.isEnabled) { console.info(message, ...optionalParams); } } /** Will only output when the debug flag in the config is on. */ warn(message, ...optionalParams) { if (this.isEnabled) { console.warn(message, ...optionalParams); } } /** Will only output when the debug flag in the config is on. */ error(message, ...optionalParams) { if (this.isEnabled) { console.error(message, ...optionalParams); } } /** Will always print output to the terminal - not depending on the debug flag. */ print(message, ...optionalParams) { console.log(message, ...optionalParams); } } //# sourceMappingURL=logger.js.map