@osovitny/anatoly 3.21.36 → 3.21.37

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.
@@ -339,18 +339,17 @@ class LoggingService {
339
339
  ?? appCoreSettings?.logging?.default
340
340
  ?? appCoreSettings?.logging?.Default
341
341
  ?? appCoreSettings?.diagnostics?.logLevel
342
- ?? appCoreSettings?.logLevel
343
- ?? LoggingService.getMsalLogLevel();
344
- return LoggingService.toLogLevel(configuredValue);
345
- }
346
- static getMsalLogLevel() {
347
- try {
348
- const json = sessionStorage.getItem(SessionStorageKeys.appMSALSettings);
349
- return json ? JSON.parse(json)?.app?.system?.loggerOptions?.logLevel : null;
350
- }
351
- catch {
352
- return null;
342
+ ?? appCoreSettings?.logLevel;
343
+ if (configuredValue !== null && typeof configuredValue !== 'undefined') {
344
+ return LoggingService.toLogLevel(configuredValue);
353
345
  }
346
+ return LoggingService.isDevMode(appCoreSettings)
347
+ ? AnatolyLogLevel.Verbose
348
+ : AnatolyLogLevel.Off;
349
+ }
350
+ static isDevMode(appCoreSettings) {
351
+ const value = appCoreSettings?.isDevMode ?? appCoreSettings?.IsDevMode;
352
+ return value === true || `${value}`.toLowerCase() === 'true';
354
353
  }
355
354
  static toLogLevel(value) {
356
355
  if (value === null || typeof value === 'undefined') {
@@ -2688,7 +2687,6 @@ class AnatolyHttpInterceptor {
2688
2687
  }
2689
2688
  //4. getCurrentContext
2690
2689
  if (lowerCaseUrl.indexOf('getcurrentcontext') > -1) {
2691
- // Only checks MSAL's current active account. It does not start login or token acquisition by itself; it only decides whether this request should call getAccessToken() at all.
2692
2690
  authorizationTokenRequired = this.authService.isUserAuthenticated();
2693
2691
  }
2694
2692
  // Change Url if need it -------------------------------------------->