http-request-manager 18.13.38 → 18.14.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.
|
@@ -826,9 +826,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
826
826
|
* ```
|
|
827
827
|
*/
|
|
828
828
|
class LoggerService {
|
|
829
|
+
static { this.DEBUG_FLAG_KEY = 'HTTP_MGR_DEBUG'; }
|
|
829
830
|
constructor() {
|
|
830
|
-
|
|
831
|
-
this.debugMode = isDevMode();
|
|
831
|
+
this.debugMode = isDevMode() && this.isDebugFlagEnabled();
|
|
832
832
|
}
|
|
833
833
|
/**
|
|
834
834
|
* Debug level logging - only shown in development mode
|
|
@@ -868,6 +868,22 @@ class LoggerService {
|
|
|
868
868
|
isDebugEnabled() {
|
|
869
869
|
return this.debugMode;
|
|
870
870
|
}
|
|
871
|
+
isDebugFlagEnabled() {
|
|
872
|
+
try {
|
|
873
|
+
if (typeof globalThis === 'undefined' || !globalThis.localStorage) {
|
|
874
|
+
return true;
|
|
875
|
+
}
|
|
876
|
+
const value = globalThis.localStorage.getItem(LoggerService.DEBUG_FLAG_KEY);
|
|
877
|
+
if (value === null) {
|
|
878
|
+
return true;
|
|
879
|
+
}
|
|
880
|
+
const normalized = value.trim().toLowerCase();
|
|
881
|
+
return !['0', 'false', 'off', 'no'].includes(normalized);
|
|
882
|
+
}
|
|
883
|
+
catch {
|
|
884
|
+
return true;
|
|
885
|
+
}
|
|
886
|
+
}
|
|
871
887
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LoggerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
872
888
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LoggerService, providedIn: 'root' }); }
|
|
873
889
|
}
|