@oino-ts/common 0.10.0 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.OINOConsoleLog = exports.OINOLog = exports.OINOLogLevel = void 0;
9
+ const OINOBenchmark_1 = require("./OINOBenchmark");
9
10
  /** Logging levels */
10
11
  var OINOLogLevel;
11
12
  (function (OINOLogLevel) {
@@ -108,6 +109,7 @@ class OINOLog {
108
109
  */
109
110
  static exception(domain, channel, method, message, data) {
110
111
  OINOLog._log(OINOLogLevel.exception, "EXCEPTION", domain, channel, method, message, data);
112
+ OINOBenchmark_1.OINOBenchmark.trackException(domain + "." + channel, method, "Exception", message, data?.message || "", data?.stack || "");
111
113
  }
112
114
  /**
113
115
  * Log error event. Error events are printed as a single line.
@@ -3,6 +3,7 @@
3
3
  * License, v. 2.0. If a copy of the MPL was not distributed with this
4
4
  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
5
5
  */
6
+ import { OINOBenchmark } from "./OINOBenchmark";
6
7
  /** Logging levels */
7
8
  export var OINOLogLevel;
8
9
  (function (OINOLogLevel) {
@@ -105,6 +106,7 @@ export class OINOLog {
105
106
  */
106
107
  static exception(domain, channel, method, message, data) {
107
108
  OINOLog._log(OINOLogLevel.exception, "EXCEPTION", domain, channel, method, message, data);
109
+ OINOBenchmark.trackException(domain + "." + channel, method, "Exception", message, data?.message || "", data?.stack || "");
108
110
  }
109
111
  /**
110
112
  * Log error event. Error events are printed as a single line.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oino-ts/common",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "OINO TS package for common classes.",
5
5
  "author": "Matias Kiviniemi (pragmatta)",
6
6
  "license": "MPL-2.0",
@@ -19,7 +19,7 @@
19
19
  "dependencies": {
20
20
  },
21
21
  "devDependencies": {
22
- "@oino-ts/types": "0.10.0"
22
+ "@oino-ts/types": "0.10.2"
23
23
  },
24
24
  "files": [
25
25
  "src/*.ts",
package/src/OINOLog.ts CHANGED
@@ -4,6 +4,8 @@
4
4
  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
5
5
  */
6
6
 
7
+ import { OINOBenchmark } from "./OINOBenchmark"
8
+
7
9
  /** Logging levels */
8
10
  export enum OINOLogLevel {
9
11
  /** Debug messages */
@@ -127,6 +129,7 @@ export abstract class OINOLog {
127
129
  */
128
130
  static exception(domain:string, channel:string, method:string, message:string, data?:any) {
129
131
  OINOLog._log(OINOLogLevel.exception, "EXCEPTION", domain, channel, method, message, data)
132
+ OINOBenchmark.trackException(domain + "." + channel, method, "Exception", message, data?.message || "", data?.stack || "")
130
133
  }
131
134
 
132
135
  /**