@osovitny/anatoly 3.21.34 → 3.21.35
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.
|
@@ -313,8 +313,12 @@ var AnatolyLogLevel;
|
|
|
313
313
|
AnatolyLogLevel[AnatolyLogLevel["Verbose"] = 3] = "Verbose";
|
|
314
314
|
})(AnatolyLogLevel || (AnatolyLogLevel = {}));
|
|
315
315
|
class LoggingService {
|
|
316
|
+
static { this.packagePrefix = '@osovitny/anatoly'; }
|
|
316
317
|
constructor() {
|
|
317
318
|
}
|
|
319
|
+
static getEventName(eventName) {
|
|
320
|
+
return `${LoggingService.packagePrefix}.${eventName}`;
|
|
321
|
+
}
|
|
318
322
|
static getConfiguredLogLevel() {
|
|
319
323
|
const appCoreSettings = AppCoreSettings;
|
|
320
324
|
const configuredValue = appCoreSettings?.logging?.logLevel?.default
|
|
@@ -400,6 +404,9 @@ class LoggingService {
|
|
|
400
404
|
error(error, ...optionalParams) {
|
|
401
405
|
LoggingService.error(error, ...optionalParams);
|
|
402
406
|
}
|
|
407
|
+
getEventName(eventName) {
|
|
408
|
+
return LoggingService.getEventName(eventName);
|
|
409
|
+
}
|
|
403
410
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LoggingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
404
411
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LoggingService, providedIn: "root" }); }
|
|
405
412
|
}
|
|
@@ -2733,13 +2740,13 @@ class AnatolyHttpInterceptor {
|
|
|
2733
2740
|
//Events
|
|
2734
2741
|
onRequestStart(loadingRequired, url) {
|
|
2735
2742
|
if (loadingRequired) {
|
|
2736
|
-
this.logger.info('
|
|
2743
|
+
this.logger.info(this.logger.getEventName('loading.show'), url);
|
|
2737
2744
|
this.loadingService.show();
|
|
2738
2745
|
}
|
|
2739
2746
|
}
|
|
2740
2747
|
onRequestEnd(loadingRequired, url) {
|
|
2741
2748
|
if (loadingRequired) {
|
|
2742
|
-
this.logger.info('
|
|
2749
|
+
this.logger.info(this.logger.getEventName('loading.hide'), url);
|
|
2743
2750
|
this.loadingService.hide();
|
|
2744
2751
|
}
|
|
2745
2752
|
}
|