Logger.js 404 B

12345678910111213141516171819
  1. export const Logger = {};
  2. Logger.showInfo = true;
  3. Logger.showWarning = true;
  4. Logger.showError = true;
  5. Logger.info = function () {
  6. if (Logger.showInfo) {
  7. console.log(...arguments);
  8. }
  9. }
  10. Logger.warn = function () {
  11. if (Logger.showWarning) {
  12. console.warn(...arguments);
  13. }
  14. }
  15. Logger.error = function () {
  16. if (Logger.showError) {
  17. console.error(...arguments);
  18. }
  19. }