@kronos-integration/endpoint 11.1.10 → 11.2.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kronos-integration/endpoint",
3
- "version": "11.1.10",
3
+ "version": "11.2.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
package/src/endpoint.mjs CHANGED
@@ -364,29 +364,39 @@ export class Endpoint {
364
364
  return [];
365
365
  }
366
366
 
367
+ log(level, arg1) {
368
+ if (this.owner.passingLogLevel(level)) {
369
+ if (typeof arg1 === "object") {
370
+ arg1.endpoint = this.name;
371
+ this.owner.log(level, arg1);
372
+ }
373
+ this.owner.log(level, { endpoint: this.name, message: arg1 });
374
+ }
375
+ }
376
+
367
377
  trace(...args) {
368
- this.owner.trace(...args);
378
+ this.log("trace", ...args);
369
379
  }
370
380
  debug(...args) {
371
- this.owner.debug(...args);
381
+ this.log("debug", ...args);
372
382
  }
373
383
  info(...args) {
374
- this.owner.info(...args);
384
+ this.log("info", ...args);
375
385
  }
376
386
  notice(...args) {
377
- this.owner.notice(...args);
387
+ this.log("notice", ...args);
378
388
  }
379
389
  warn(...args) {
380
- this.owner.warn(...args);
390
+ this.log("warn", ...args);
381
391
  }
382
392
  error(...args) {
383
- this.owner.error(...args);
393
+ this.log("error", ...args);
384
394
  }
385
395
  crit(...args) {
386
- this.owner.crit(...args);
396
+ this.log("crit", ...args);
387
397
  }
388
398
  alert(...args) {
389
- this.owner.alert(...args);
399
+ this.log("alert", ...args);
390
400
  }
391
401
  }
392
402
 
@@ -153,6 +153,7 @@ export declare class Endpoint {
153
153
  */
154
154
  didConnect(endpoint: Endpoint, other: Endpoint): void;
155
155
  get receivingInterceptors(): never[];
156
+ log(level: any, arg1: any): void;
156
157
  trace(...args: any[]): void;
157
158
  debug(...args: any[]): void;
158
159
  info(...args: any[]): void;