Logger.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  7. function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  8. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  9. var Logger =
  10. /*#__PURE__*/
  11. function () {
  12. function Logger() {
  13. _classCallCheck(this, Logger);
  14. this.user = null;
  15. }
  16. _createClass(Logger, [{
  17. key: "log",
  18. value: function log() {
  19. var _console;
  20. console.log("%c[*] \t Logger \t [*]", 'color:black');
  21. (_console = console).log.apply(_console, arguments);
  22. }
  23. }, {
  24. key: "error",
  25. value: function error() {
  26. var _console2;
  27. console.log("%c[XXX] \t Logger Error \t [XXX]", 'color:red');
  28. for (var _len = arguments.length, e = new Array(_len), _key = 0; _key < _len; _key++) {
  29. e[_key] = arguments[_key];
  30. }
  31. (_console2 = console).log.apply(_console2, e);
  32. console.log("%c[^] \t END END END\t [^]", 'color:red');
  33. throw e;
  34. }
  35. }, {
  36. key: "warning",
  37. value: function warning() {
  38. var _console3;
  39. console.log("%c [Warning] \t Logger Warning \t [Warning]", 'color: #F08700');
  40. (_console3 = console).log.apply(_console3, arguments);
  41. }
  42. }]);
  43. return Logger;
  44. }();
  45. var _default = new Logger();
  46. exports.default = _default;