Skip to content

Commit

Permalink
fix(hub-common): arcGISContextManager should only override logLevel i…
Browse files Browse the repository at this point in the history
…f passed in

affects: @esri/hub-common
  • Loading branch information
tomwayson committed Feb 27, 2025
1 parent a42d7c3 commit 3ef3f43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 2 additions & 5 deletions packages/common/src/ArcGISContextManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ export class ArcGISContextManager {

private _currentUser: IUser;

private _logLevel: Level = Level.error;

private _serviceStatus: HubServiceStatus;

private _featureFlags: IFeatureFlags = {};
Expand All @@ -105,11 +103,10 @@ export class ArcGISContextManager {
// Having a unique id makes debugging easier
this.id = new Date().getTime();

// TODO: remove setLogLevel at next breaking change
// TODO: remove all log level logic at next breaking change
if (opts.logLevel) {
this._logLevel = opts.logLevel;
Logger.setLogLevel(opts.logLevel);
}
Logger.setLogLevel(this._logLevel);

Logger.debug(`ArcGISContextManager:ctor: Creating ${this.id}`);

Expand Down
3 changes: 1 addition & 2 deletions packages/common/src/types/IArcGISContextManagerOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ export interface IArcGISContextManagerOptions {
properties?: Record<string, any>;

/**
* DEPRECATED: use `globalThis.arcgisHubConfig.logLevel` instead
* Logging level
* off > error > warn > info > debug > all
* defaults to 'error'
*/
logLevel?: Level;

Expand Down

0 comments on commit 3ef3f43

Please sign in to comment.