1 line
6.5 KiB
JSON
1 line
6.5 KiB
JSON
{"id":"../node_modules/@pushrocks/smartlog/dist/smartlog.classes.smartlog.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/smartlog/ts/smartlog.classes.smartlog.ts","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/package.json","includedInParent":true,"mtime":1542069011329},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/smartlog/package.json","includedInParent":true,"mtime":1542058764035},{"name":"./smartlog.classes.logrouter","loc":{"line":3,"column":45},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/smartlog/dist/smartlog.classes.smartlog.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/smartlog/dist/smartlog.classes.logrouter.js"}],"generated":{"js":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst smartlog_classes_logrouter_1 = require(\"./smartlog.classes.logrouter\");\nclass Smartlog {\n constructor(optionsArg) {\n this.logRouter = new smartlog_classes_logrouter_1.LogRouter();\n this.logContext = optionsArg.logContext;\n this.minimumLogLevel = optionsArg.minimumLogLevel;\n }\n addLogDestination(logDestinationArg) {\n this.logRouter.addLogDestination(logDestinationArg);\n }\n // ============\n // Logger Setup\n // ============\n /**\n * enables console logging\n */\n enableConsole() {\n this.consoleEnabled = true;\n }\n // =============\n // log functions\n // =============\n /**\n * main log method\n * @param logLevelArg - the log level\n * @param logMessageArg - the log message\n * @param logDataArg - any additional log data\n */\n log(logLevelArg, logMessageArg, logDataArg) {\n if (this.consoleEnabled) {\n console.log(`LOG: ${logLevelArg}: ${logMessageArg}`);\n }\n const logPackage = {\n timestamp: Date.now(),\n type: 'log',\n context: this.logContext,\n level: logLevelArg,\n message: logMessageArg\n };\n if (logDataArg) {\n logPackage.data = logDataArg;\n }\n this.logRouter.routeLog(logPackage);\n }\n increment(logLevelArg, logMessageArg) {\n if (this.consoleEnabled) {\n console.log(`INCREMENT: ${logLevelArg}: ${logMessageArg}`);\n }\n this.logRouter.routeLog({\n timestamp: Date.now(),\n type: 'increment',\n context: this.logContext,\n level: logLevelArg,\n message: logMessageArg\n });\n }\n handleLogPackage(logPackageArg) {\n this.logRouter.routeLog(logPackageArg);\n }\n}\nexports.Smartlog = Smartlog;\n","map":{"version":3,"file":"smartlog.classes.smartlog.js","sourceRoot":"","sources":["../ts/smartlog.classes.smartlog.ts"],"names":[],"mappings":";;AAKA,6EAAyD;AAOzD,MAAa,QAAQ;IAYnB,YAAY,UAAsC;QAN1C,cAAS,GAAG,IAAI,sCAAS,EAAE,CAAC;QAOlC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;IACpD,CAAC;IAPM,iBAAiB,CAAE,iBAAkC;QAC1D,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACtD,CAAC;IAQD,eAAe;IACf,eAAe;IACf,eAAe;IAEf;;OAEG;IACH,aAAa;QACX,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC7B,CAAC;IAED,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB;;;;;OAKG;IACI,GAAG,CAAC,WAAsB,EAAE,aAAqB,EAAE,UAAgB;QACxE,IAAI,IAAI,CAAC,cAAc,EAAE;YACvB,OAAO,CAAC,GAAG,CAAC,QAAQ,WAAW,KAAK,aAAa,EAAE,CAAC,CAAC;SACtD;QACD,MAAM,UAAU,GAAgB;YAC9B,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,IAAI,CAAC,UAAU;YACxB,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,aAAa;SACvB,CAAC;QACF,IAAG,UAAU,EAAE;YACb,UAAU,CAAC,IAAI,GAAG,UAAU,CAAC;SAC9B;QACD,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC;IAEM,SAAS,CAAC,WAAsB,EAAE,aAAa;QACpD,IAAI,IAAI,CAAC,cAAc,EAAE;YACvB,OAAO,CAAC,GAAG,CAAC,cAAc,WAAW,KAAK,aAAa,EAAE,CAAC,CAAC;SAC5D;QACD,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;YACtB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,IAAI,CAAC,UAAU;YACxB,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,aAAa;SACvB,CAAC,CAAC;IACL,CAAC;IAEM,gBAAgB,CAAC,aAA0B;QAChD,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IACzC,CAAC;CACF;AAvED,4BAuEC","sourcesContent":["import * as plugins from './smartlog.plugins';\n\n// interfaces\nimport { TLogType, TEnvironment, ILogContext, TLogLevel, TRuntime, ILogDestination, ILogPackage } from '@pushrocks/smartlog-interfaces';\n\nimport { LogRouter } from './smartlog.classes.logrouter';\n\nexport interface ISmartlogContructorOptions {\n logContext: ILogContext;\n minimumLogLevel?: TLogLevel;\n}\n\nexport class Smartlog {\n private logContext: ILogContext;\n private minimumLogLevel: TLogLevel;\n \n private consoleEnabled: boolean;\n \n private logRouter = new LogRouter();\n\n public addLogDestination (logDestinationArg: ILogDestination) {\n this.logRouter.addLogDestination(logDestinationArg);\n }\n\n constructor(optionsArg: ISmartlogContructorOptions) {\n this.logContext = optionsArg.logContext;\n this.minimumLogLevel = optionsArg.minimumLogLevel;\n }\n\n\n // ============\n // Logger Setup\n // ============\n\n /**\n * enables console logging\n */\n enableConsole() {\n this.consoleEnabled = true;\n }\n\n // =============\n // log functions\n // =============\n /**\n * main log method\n * @param logLevelArg - the log level\n * @param logMessageArg - the log message\n * @param logDataArg - any additional log data\n */\n public log(logLevelArg: TLogLevel, logMessageArg: string, logDataArg?: any) {\n if (this.consoleEnabled) {\n console.log(`LOG: ${logLevelArg}: ${logMessageArg}`);\n }\n const logPackage: ILogPackage = {\n timestamp: Date.now(),\n type: 'log',\n context: this.logContext,\n level: logLevelArg,\n message: logMessageArg\n };\n if(logDataArg) {\n logPackage.data = logDataArg;\n }\n this.logRouter.routeLog(logPackage);\n }\n\n public increment(logLevelArg: TLogLevel, logMessageArg) {\n if (this.consoleEnabled) {\n console.log(`INCREMENT: ${logLevelArg}: ${logMessageArg}`);\n }\n this.logRouter.routeLog({\n timestamp: Date.now(),\n type: 'increment',\n context: this.logContext,\n level: logLevelArg,\n message: logMessageArg\n });\n }\n\n public handleLogPackage(logPackageArg: ILogPackage) {\n this.logRouter.routeLog(logPackageArg);\n }\n}\n"]}},"hash":"4bc32b8381fb371d179765763c813adc","cacheData":{"env":{}}} |