opennms
Version:
Client API for the OpenNMS network monitoring platform
1 lines • 26.1 kB
JSON
{"remainingRequest":"/data/node_modules/babel-loader/lib/index.js!/data/node_modules/typescript-logging/dist/commonjs/log/LoggerOptions.js","dependencies":[{"path":"/data/node_modules/typescript-logging/dist/commonjs/log/LoggerOptions.js","mtime":1553611387932},{"path":"/data/.babelrc","mtime":1553611371556},{"path":"/data/node_modules/cache-loader/dist/cjs.js","mtime":1553611387012},{"path":"/data/node_modules/babel-loader/lib/index.js","mtime":1553611386992}],"contextDependencies":[],"result":["\"use strict\";\n/**\n * Log level for a logger.\n */\n\nvar LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"Trace\"] = 0] = \"Trace\";\n LogLevel[LogLevel[\"Debug\"] = 1] = \"Debug\";\n LogLevel[LogLevel[\"Info\"] = 2] = \"Info\";\n LogLevel[LogLevel[\"Warn\"] = 3] = \"Warn\";\n LogLevel[LogLevel[\"Error\"] = 4] = \"Error\";\n LogLevel[LogLevel[\"Fatal\"] = 5] = \"Fatal\";\n})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));\n/* tslint:disable:no-namespace */\n(function (LogLevel) {\n /**\n * Returns LogLevel based on string representation\n * @param val Value\n * @returns {LogLevel}, Error is thrown if invalid.\n */\n function fromString(val) {\n if (val == null) {\n throw new Error(\"Argument must be set\");\n }\n switch (val.toLowerCase()) {\n case \"trace\":\n return LogLevel.Trace;\n case \"debug\":\n return LogLevel.Debug;\n case \"info\":\n return LogLevel.Info;\n case \"warn\":\n return LogLevel.Warn;\n case \"error\":\n return LogLevel.Error;\n case \"fatal\":\n return LogLevel.Fatal;\n default:\n throw new Error(\"Unsupported value for conversion: \" + val);\n }\n }\n LogLevel.fromString = fromString;\n})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));\n/* tslint:disable:enable-namespace */\n/**\n * Where to log to? Pick one of the constants. Custom requires a callback to be present, see LFService.createLoggerFactory(...)\n * where this comes into play.\n */\nvar LoggerType;\n(function (LoggerType) {\n LoggerType[LoggerType[\"Console\"] = 0] = \"Console\";\n LoggerType[LoggerType[\"MessageBuffer\"] = 1] = \"MessageBuffer\";\n LoggerType[LoggerType[\"Custom\"] = 2] = \"Custom\";\n})(LoggerType = exports.LoggerType || (exports.LoggerType = {}));\n/**\n * Defines several date enums used for formatting a date.\n */\nvar DateFormatEnum;\n(function (DateFormatEnum) {\n /**\n * Displays as: year-month-day hour:minute:second,millis -> 1999-02-12 23:59:59,123\n * Note the date separator can be set separately.\n */\n DateFormatEnum[DateFormatEnum[\"Default\"] = 0] = \"Default\";\n /**\n * Displays as: year-month-day hour:minute:second -> 1999-02-12 23:59:59\n * Note the date separator can be set separately.\n */\n DateFormatEnum[DateFormatEnum[\"YearMonthDayTime\"] = 1] = \"YearMonthDayTime\";\n /**\n * Displays as: year-day-month hour:minute:second,millis -> 1999-12-02 23:59:59,123\n * Note the date separator can be set separately.\n */\n DateFormatEnum[DateFormatEnum[\"YearDayMonthWithFullTime\"] = 2] = \"YearDayMonthWithFullTime\";\n /**\n * Displays as: year-day-month hour:minute:second -> 1999-12-02 23:59:59\n * Note the date separator can be set separately.\n */\n DateFormatEnum[DateFormatEnum[\"YearDayMonthTime\"] = 3] = \"YearDayMonthTime\";\n})(DateFormatEnum = exports.DateFormatEnum || (exports.DateFormatEnum = {}));\n/* tslint:disable:no-namespace */\n(function (DateFormatEnum) {\n /**\n * Returns LogLevel based on string representation\n * @param val Value\n * @returns {LogLevel}, Error is thrown if invalid.\n */\n function fromString(val) {\n if (val == null) {\n throw new Error(\"Argument must be set\");\n }\n switch (val.toLowerCase()) {\n case \"default\":\n return DateFormatEnum.Default;\n case \"yearmonthdayTime\":\n return DateFormatEnum.YearMonthDayTime;\n case \"yeardaymonthwithfulltime\":\n return DateFormatEnum.YearDayMonthWithFullTime;\n case \"yeardaymonthtime\":\n return DateFormatEnum.YearDayMonthTime;\n default:\n throw new Error(\"Unsupported value for conversion: \" + val);\n }\n }\n DateFormatEnum.fromString = fromString;\n})(DateFormatEnum = exports.DateFormatEnum || (exports.DateFormatEnum = {}));\n/* tslint:disable:enable-namespace */\n/**\n * DateFormat class, stores data on how to format a date.\n */\nvar DateFormat = function () {\n /**\n * Constructor to define the dateformat used for logging, can be called empty as it uses defaults.\n * @param formatEnum DateFormatEnum, use one of the constants from the enum. Defaults to DateFormatEnum.Default\n * @param dateSeparator Separator used between dates, defaults to -\n */\n function DateFormat(formatEnum, dateSeparator) {\n if (formatEnum === void 0) {\n formatEnum = DateFormatEnum.Default;\n }\n if (dateSeparator === void 0) {\n dateSeparator = \"-\";\n }\n this._formatEnum = formatEnum;\n this._dateSeparator = dateSeparator;\n }\n Object.defineProperty(DateFormat.prototype, \"formatEnum\", {\n get: function get() {\n return this._formatEnum;\n },\n set: function set(value) {\n this._formatEnum = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DateFormat.prototype, \"dateSeparator\", {\n get: function get() {\n return this._dateSeparator;\n },\n set: function set(value) {\n this._dateSeparator = value;\n },\n enumerable: true,\n configurable: true\n });\n DateFormat.prototype.copy = function () {\n return new DateFormat(this._formatEnum, this._dateSeparator);\n };\n return DateFormat;\n}();\nexports.DateFormat = DateFormat;\n/**\n * Information about the log format, what will a log line look like?\n */\nvar LogFormat = function () {\n /**\n * Constructor to create a LogFormat. Can be created without parameters where it will use sane defaults.\n * @param dateFormat DateFormat (what needs the date look like in the log line)\n * @param showTimeStamp Show date timestamp at all?\n * @param showLoggerName Show the logger name?\n */\n function LogFormat(dateFormat, showTimeStamp, showLoggerName) {\n if (dateFormat === void 0) {\n dateFormat = new DateFormat();\n }\n if (showTimeStamp === void 0) {\n showTimeStamp = true;\n }\n if (showLoggerName === void 0) {\n showLoggerName = true;\n }\n this._showTimeStamp = true;\n this._showLoggerName = true;\n this._dateFormat = dateFormat;\n this._showTimeStamp = showTimeStamp;\n this._showLoggerName = showLoggerName;\n }\n Object.defineProperty(LogFormat.prototype, \"dateFormat\", {\n get: function get() {\n return this._dateFormat;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LogFormat.prototype, \"showTimeStamp\", {\n get: function get() {\n return this._showTimeStamp;\n },\n set: function set(value) {\n this._showTimeStamp = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LogFormat.prototype, \"showLoggerName\", {\n get: function get() {\n return this._showLoggerName;\n },\n set: function set(value) {\n this._showLoggerName = value;\n },\n enumerable: true,\n configurable: true\n });\n return LogFormat;\n}();\nexports.LogFormat = LogFormat;\n/**\n * Information about the log format, what will a log line look like?\n */\nvar CategoryLogFormat = function () {\n /**\n * Create an instance defining the category log format used.\n * @param dateFormat Date format (uses default), for details see DateFormat class.\n * @param showTimeStamp True to show timestamp in the logging, defaults to true.\n * @param showCategoryName True to show category name in the logging, defaults to true.\n */\n function CategoryLogFormat(dateFormat, showTimeStamp, showCategoryName) {\n if (dateFormat === void 0) {\n dateFormat = new DateFormat();\n }\n if (showTimeStamp === void 0) {\n showTimeStamp = true;\n }\n if (showCategoryName === void 0) {\n showCategoryName = true;\n }\n this._dateFormat = dateFormat;\n this._showTimeStamp = showTimeStamp;\n this._showCategoryName = showCategoryName;\n }\n Object.defineProperty(CategoryLogFormat.prototype, \"dateFormat\", {\n get: function get() {\n return this._dateFormat;\n },\n set: function set(value) {\n this._dateFormat = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CategoryLogFormat.prototype, \"showTimeStamp\", {\n get: function get() {\n return this._showTimeStamp;\n },\n set: function set(value) {\n this._showTimeStamp = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CategoryLogFormat.prototype, \"showCategoryName\", {\n get: function get() {\n return this._showCategoryName;\n },\n set: function set(value) {\n this._showCategoryName = value;\n },\n enumerable: true,\n configurable: true\n });\n CategoryLogFormat.prototype.copy = function () {\n return new CategoryLogFormat(this._dateFormat.copy(), this._showTimeStamp, this._showCategoryName);\n };\n return CategoryLogFormat;\n}();\nexports.CategoryLogFormat = CategoryLogFormat;\n//# sourceMappingURL=LoggerOptions.js.map",{"version":3,"sources":["node_modules/typescript-logging/dist/commonjs/log/LoggerOptions.js"],"names":["LogLevel","exports","fromString","val","Error","toLowerCase","Trace","Debug","Info","Warn","Fatal","LoggerType","DateFormatEnum","Default","YearMonthDayTime","YearDayMonthWithFullTime","YearDayMonthTime","DateFormat","formatEnum","dateSeparator","_formatEnum","_dateSeparator","Object","defineProperty","prototype","get","set","value","enumerable","configurable","copy","LogFormat","dateFormat","showTimeStamp","showLoggerName","_showTimeStamp","_showLoggerName","_dateFormat","CategoryLogFormat","showCategoryName","_showCategoryName"],"mappings":"AAAA;AACA;;;;AAGA,IAAIA,QAAJ;AACA,CAAC,UAAUA,QAAV,EAAoB;AACjBA,aAASA,SAAS,OAAT,IAAoB,CAA7B,IAAkC,OAAlC;AACAA,aAASA,SAAS,OAAT,IAAoB,CAA7B,IAAkC,OAAlC;AACAA,aAASA,SAAS,MAAT,IAAmB,CAA5B,IAAiC,MAAjC;AACAA,aAASA,SAAS,MAAT,IAAmB,CAA5B,IAAiC,MAAjC;AACAA,aAASA,SAAS,OAAT,IAAoB,CAA7B,IAAkC,OAAlC;AACAA,aAASA,SAAS,OAAT,IAAoB,CAA7B,IAAkC,OAAlC;AACH,CAPD,EAOGA,WAAWC,QAAQD,QAAR,KAAqBC,QAAQD,QAAR,GAAmB,EAAxC,CAPd;AAQA;AACA,CAAC,UAAUA,QAAV,EAAoB;AACjB;;;;;AAKA,aAASE,UAAT,CAAoBC,GAApB,EAAyB;AACrB,YAAIA,OAAO,IAAX,EAAiB;AACb,kBAAM,IAAIC,KAAJ,CAAU,sBAAV,CAAN;AACH;AACD,gBAAQD,IAAIE,WAAJ,EAAR;AACI,iBAAK,OAAL;AACI,uBAAOL,SAASM,KAAhB;AACJ,iBAAK,OAAL;AACI,uBAAON,SAASO,KAAhB;AACJ,iBAAK,MAAL;AACI,uBAAOP,SAASQ,IAAhB;AACJ,iBAAK,MAAL;AACI,uBAAOR,SAASS,IAAhB;AACJ,iBAAK,OAAL;AACI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cAAP,CAAsBe,kBAAkBd,SAAxC,EAAmD,kBAAnD,EAAuE;AACnEC,aAAK,eAAY;AACb,mBAAO,KAAKe,iBAAZ;AACH,SAHkE;AAInEd,aAAK,aAAUC,KAAV,EAAiB;AAClB,iBAAKa,iBAAL,GAAyBb,KAAzB;AACH,SANkE;AAOnEC,oBAAY,IAPuD;AAQnEC,sBAAc;AARqD,KAAvE;AAUAS,sBAAkBd,SAAlB,CAA4BM,IAA5B,GAAmC,YAAY;AAC3C,eAAO,IAAIQ,iBAAJ,CAAsB,KAAKD,WAAL,CAAiBP,IAAjB,EAAtB,EAA+C,KAAKK,cAApD,EAAoE,KAAKK,iBAAzE,CAAP;AACH,KAFD;AAGA,WAAOF,iBAAP;AACH,CAjDwB,EAAzB;AAkDArC,QAAQqC,iBAAR,GAA4BA,iBAA5B;AACA","file":"LoggerOptions.js","sourceRoot":"/data","sourcesContent":["\"use strict\";\n/**\n * Log level for a logger.\n */\nvar LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"Trace\"] = 0] = \"Trace\";\n LogLevel[LogLevel[\"Debug\"] = 1] = \"Debug\";\n LogLevel[LogLevel[\"Info\"] = 2] = \"Info\";\n LogLevel[LogLevel[\"Warn\"] = 3] = \"Warn\";\n LogLevel[LogLevel[\"Error\"] = 4] = \"Error\";\n LogLevel[LogLevel[\"Fatal\"] = 5] = \"Fatal\";\n})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));\n/* tslint:disable:no-namespace */\n(function (LogLevel) {\n /**\n * Returns LogLevel based on string representation\n * @param val Value\n * @returns {LogLevel}, Error is thrown if invalid.\n */\n function fromString(val) {\n if (val == null) {\n throw new Error(\"Argument must be set\");\n }\n switch (val.toLowerCase()) {\n case \"trace\":\n return LogLevel.Trace;\n case \"debug\":\n return LogLevel.Debug;\n case \"info\":\n return LogLevel.Info;\n case \"warn\":\n return LogLevel.Warn;\n case \"error\":\n return LogLevel.Error;\n case \"fatal\":\n return LogLevel.Fatal;\n default:\n throw new Error(\"Unsupported value for conversion: \" + val);\n }\n }\n LogLevel.fromString = fromString;\n})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));\n/* tslint:disable:enable-namespace */\n/**\n * Where to log to? Pick one of the constants. Custom requires a callback to be present, see LFService.createLoggerFactory(...)\n * where this comes into play.\n */\nvar LoggerType;\n(function (LoggerType) {\n LoggerType[LoggerType[\"Console\"] = 0] = \"Console\";\n LoggerType[LoggerType[\"MessageBuffer\"] = 1] = \"MessageBuffer\";\n LoggerType[LoggerType[\"Custom\"] = 2] = \"Custom\";\n})(LoggerType = exports.LoggerType || (exports.LoggerType = {}));\n/**\n * Defines several date enums used for formatting a date.\n */\nvar DateFormatEnum;\n(function (DateFormatEnum) {\n /**\n * Displays as: year-month-day hour:minute:second,millis -> 1999-02-12 23:59:59,123\n * Note the date separator can be set separately.\n */\n DateFormatEnum[DateFormatEnum[\"Default\"] = 0] = \"Default\";\n /**\n * Displays as: year-month-day hour:minute:second -> 1999-02-12 23:59:59\n * Note the date separator can be set separately.\n */\n DateFormatEnum[DateFormatEnum[\"YearMonthDayTime\"] = 1] = \"YearMonthDayTime\";\n /**\n * Displays as: year-day-month hour:minute:second,millis -> 1999-12-02 23:59:59,123\n * Note the date separator can be set separately.\n */\n DateFormatEnum[DateFormatEnum[\"YearDayMonthWithFullTime\"] = 2] = \"YearDayMonthWithFullTime\";\n /**\n * Displays as: year-day-month hour:minute:second -> 1999-12-02 23:59:59\n * Note the date separator can be set separately.\n */\n DateFormatEnum[DateFormatEnum[\"YearDayMonthTime\"] = 3] = \"YearDayMonthTime\";\n})(DateFormatEnum = exports.DateFormatEnum || (exports.DateFormatEnum = {}));\n/* tslint:disable:no-namespace */\n(function (DateFormatEnum) {\n /**\n * Returns LogLevel based on string representation\n * @param val Value\n * @returns {LogLevel}, Error is thrown if invalid.\n */\n function fromString(val) {\n if (val == null) {\n throw new Error(\"Argument must be set\");\n }\n switch (val.toLowerCase()) {\n case \"default\":\n return DateFormatEnum.Default;\n case \"yearmonthdayTime\":\n return DateFormatEnum.YearMonthDayTime;\n case \"yeardaymonthwithfulltime\":\n return DateFormatEnum.YearDayMonthWithFullTime;\n case \"yeardaymonthtime\":\n return DateFormatEnum.YearDayMonthTime;\n default:\n throw new Error(\"Unsupported value for conversion: \" + val);\n }\n }\n DateFormatEnum.fromString = fromString;\n})(DateFormatEnum = exports.DateFormatEnum || (exports.DateFormatEnum = {}));\n/* tslint:disable:enable-namespace */\n/**\n * DateFormat class, stores data on how to format a date.\n */\nvar DateFormat = (function () {\n /**\n * Constructor to define the dateformat used for logging, can be called empty as it uses defaults.\n * @param formatEnum DateFormatEnum, use one of the constants from the enum. Defaults to DateFormatEnum.Default\n * @param dateSeparator Separator used between dates, defaults to -\n */\n function DateFormat(formatEnum, dateSeparator) {\n if (formatEnum === void 0) { formatEnum = DateFormatEnum.Default; }\n if (dateSeparator === void 0) { dateSeparator = \"-\"; }\n this._formatEnum = formatEnum;\n this._dateSeparator = dateSeparator;\n }\n Object.defineProperty(DateFormat.prototype, \"formatEnum\", {\n get: function () {\n return this._formatEnum;\n },\n set: function (value) {\n this._formatEnum = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DateFormat.prototype, \"dateSeparator\", {\n get: function () {\n return this._dateSeparator;\n },\n set: function (value) {\n this._dateSeparator = value;\n },\n enumerable: true,\n configurable: true\n });\n DateFormat.prototype.copy = function () {\n return new DateFormat(this._formatEnum, this._dateSeparator);\n };\n return DateFormat;\n}());\nexports.DateFormat = DateFormat;\n/**\n * Information about the log format, what will a log line look like?\n */\nvar LogFormat = (function () {\n /**\n * Constructor to create a LogFormat. Can be created without parameters where it will use sane defaults.\n * @param dateFormat DateFormat (what needs the date look like in the log line)\n * @param showTimeStamp Show date timestamp at all?\n * @param showLoggerName Show the logger name?\n */\n function LogFormat(dateFormat, showTimeStamp, showLoggerName) {\n if (dateFormat === void 0) { dateFormat = new DateFormat(); }\n if (showTimeStamp === void 0) { showTimeStamp = true; }\n if (showLoggerName === void 0) { showLoggerName = true; }\n this._showTimeStamp = true;\n this._showLoggerName = true;\n this._dateFormat = dateFormat;\n this._showTimeStamp = showTimeStamp;\n this._showLoggerName = showLoggerName;\n }\n Object.defineProperty(LogFormat.prototype, \"dateFormat\", {\n get: function () {\n return this._dateFormat;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LogFormat.prototype, \"showTimeStamp\", {\n get: function () {\n return this._showTimeStamp;\n },\n set: function (value) {\n this._showTimeStamp = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LogFormat.prototype, \"showLoggerName\", {\n get: function () {\n return this._showLoggerName;\n },\n set: function (value) {\n this._showLoggerName = value;\n },\n enumerable: true,\n configurable: true\n });\n return LogFormat;\n}());\nexports.LogFormat = LogFormat;\n/**\n * Information about the log format, what will a log line look like?\n */\nvar CategoryLogFormat = (function () {\n /**\n * Create an instance defining the category log format used.\n * @param dateFormat Date format (uses default), for details see DateFormat class.\n * @param showTimeStamp True to show timestamp in the logging, defaults to true.\n * @param showCategoryName True to show category name in the logging, defaults to true.\n */\n function CategoryLogFormat(dateFormat, showTimeStamp, showCategoryName) {\n if (dateFormat === void 0) { dateFormat = new DateFormat(); }\n if (showTimeStamp === void 0) { showTimeStamp = true; }\n if (showCategoryName === void 0) { showCategoryName = true; }\n this._dateFormat = dateFormat;\n this._showTimeStamp = showTimeStamp;\n this._showCategoryName = showCategoryName;\n }\n Object.defineProperty(CategoryLogFormat.prototype, \"dateFormat\", {\n get: function () {\n return this._dateFormat;\n },\n set: function (value) {\n this._dateFormat = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CategoryLogFormat.prototype, \"showTimeStamp\", {\n get: function () {\n return this._showTimeStamp;\n },\n set: function (value) {\n this._showTimeStamp = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CategoryLogFormat.prototype, \"showCategoryName\", {\n get: function () {\n return this._showCategoryName;\n },\n set: function (value) {\n this._showCategoryName = value;\n },\n enumerable: true,\n configurable: true\n });\n CategoryLogFormat.prototype.copy = function () {\n return new CategoryLogFormat(this._dateFormat.copy(), this._showTimeStamp, this._showCategoryName);\n };\n return CategoryLogFormat;\n}());\nexports.CategoryLogFormat = CategoryLogFormat;\n//# sourceMappingURL=LoggerOptions.js.map"]}]}