@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 +1 -1
- package/src/endpoint.mjs +18 -8
- package/types/endpoint.d.mts +1 -0
package/package.json
CHANGED
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.
|
|
378
|
+
this.log("trace", ...args);
|
|
369
379
|
}
|
|
370
380
|
debug(...args) {
|
|
371
|
-
this.
|
|
381
|
+
this.log("debug", ...args);
|
|
372
382
|
}
|
|
373
383
|
info(...args) {
|
|
374
|
-
this.
|
|
384
|
+
this.log("info", ...args);
|
|
375
385
|
}
|
|
376
386
|
notice(...args) {
|
|
377
|
-
this.
|
|
387
|
+
this.log("notice", ...args);
|
|
378
388
|
}
|
|
379
389
|
warn(...args) {
|
|
380
|
-
this.
|
|
390
|
+
this.log("warn", ...args);
|
|
381
391
|
}
|
|
382
392
|
error(...args) {
|
|
383
|
-
this.
|
|
393
|
+
this.log("error", ...args);
|
|
384
394
|
}
|
|
385
395
|
crit(...args) {
|
|
386
|
-
this.
|
|
396
|
+
this.log("crit", ...args);
|
|
387
397
|
}
|
|
388
398
|
alert(...args) {
|
|
389
|
-
this.
|
|
399
|
+
this.log("alert", ...args);
|
|
390
400
|
}
|
|
391
401
|
}
|
|
392
402
|
|
package/types/endpoint.d.mts
CHANGED
|
@@ -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;
|