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,MAAO,WACL,IAAyB,IAArB,KAAK,YACP,MAAM,IAAI,MAAM,gFAElB,KAAK,OAAO,KAAK,MAAM,KAAM,UAC/B,GAIC,CACD,IAAK,OACL,MAAO,WACL,IAAyB,IAArB,KAAK,YACP,MAAM,IAAI,MAAM,gFAElB,KAAK,OAAO,KAAK,MAAM,KAAM,UAC/B,GAIC,CACD,IAAK,UACL,MAAO,WACL,IAAyB,IAArB,KAAK,YACP,MAAM,IAAI,MAAM,gFAElB,KAAK,OAAO,QAAQ,MAAM,KAAM,UAClC,GAIC,CACD,IAAK,QACL,MAAO,WACL,IAAyB,IAArB,KAAK,YACP,MAAM,IAAI,MAAM,gFAElB,KAAK,OAAO,MAAM,MAAM,KAAM,UAChC,GAIC,CACD,IAAK,QACL,MAAO,WACL,IAAyB,IAArB,KAAK,YACP,MAAM,IAAI,MAAM,gFAElB,KAAK,OAAO,MAAM,MAAM,KAAM,UAChC,KAGK,CACT,CAnFa,GAwFT,OAAS,QAAQ,OAAS,uCAC1B,iBAAmB,QAAQ,iBAAmB,SAA0B,GAC1E,QAAQ,OAAS,OAAS,IAAI,OAAO,EACvC","file":"/npm/@swift-developer/swifty-logger@0.2.0/dist/logger.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@swift-developer/swifty-logger@0.2.0/dist/logger.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.initializeLogger = exports.LOGGER = undefined;\n\nvar _createClass = function () { 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _winston = require('winston');\n\nvar _winston2 = _interopRequireDefault(_winston);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Logger = function () {\n  function Logger(config) {\n    _classCallCheck(this, Logger);\n\n    if (config.logLevel === undefined) {\n      config.logLevel = 'silly';\n    }\n\n    this.logger = new _winston2.default.Logger({\n      transports: [new _winston2.default.transports.Console({ level: config.logLevel }), new _winston2.default.transports.File({ filename: 'application.log', level: 'silly' })]\n    });\n    this.initialized = true;\n  }\n\n  // Log level: 0\n\n\n  _createClass(Logger, [{\n    key: 'error',\n    value: function error() {\n      if (this.initialized !== true) {\n        throw new Error(\"Attempted to log something before the LOGGER had a chance to be initialized.\");\n      }\n      this.logger.error.apply(this, arguments);\n    }\n\n    // Log level: 1\n\n  }, {\n    key: 'warn',\n    value: function warn() {\n      if (this.initialized !== true) {\n        throw new Error(\"Attempted to log something before the LOGGER had a chance to be initialized.\");\n      }\n      this.logger.warn.apply(this, arguments);\n    }\n\n    // Log level: 2\n\n  }, {\n    key: 'info',\n    value: function info() {\n      if (this.initialized !== true) {\n        throw new Error(\"Attempted to log something before the LOGGER had a chance to be initialized.\");\n      }\n      this.logger.info.apply(this, arguments);\n    }\n\n    // Log level: 3\n\n  }, {\n    key: 'verbose',\n    value: function verbose() {\n      if (this.initialized !== true) {\n        throw new Error(\"Attempted to log something before the LOGGER had a chance to be initialized.\");\n      }\n      this.logger.verbose.apply(this, arguments);\n    }\n\n    // Log level: 4\n\n  }, {\n    key: 'debug',\n    value: function debug() {\n      if (this.initialized !== true) {\n        throw new Error(\"Attempted to log something before the LOGGER had a chance to be initialized.\");\n      }\n      this.logger.debug.apply(this, arguments);\n    }\n\n    // Log level: 5\n\n  }, {\n    key: 'silly',\n    value: function silly() {\n      if (this.initialized !== true) {\n        throw new Error(\"Attempted to log something before the LOGGER had a chance to be initialized.\");\n      }\n      this.logger.silly.apply(this, arguments);\n    }\n  }]);\n\n  return Logger;\n}();\n\n// Export a reference to the logger as LOGGER\n\n\nvar LOGGER = exports.LOGGER = \"Logger has not been initialized yet!\";\nvar initializeLogger = exports.initializeLogger = function initializeLogger(config) {\n  exports.LOGGER = LOGGER = new Logger(config);\n};"]}