Skip to content

Commit

Permalink
Remove verbose logging which is not used (microsoft/vscode-python#23001)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Raj authored Feb 29, 2024
1 parent d287ae9 commit 82d48b0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { inject, injectable, named } from 'inversify';
import { Memento } from 'vscode';
import { IExtensionSingleActivationService } from '../activation/types';
import { traceError, traceVerbose, traceWarn } from '../logging';
import { traceError } from '../logging';
import { ICommandManager } from './application/types';
import { Commands } from './constants';
import {
Expand Down Expand Up @@ -92,12 +92,8 @@ export class PersistentState<T> implements IPersistentState<T> {
// Due to a VSCode bug sometimes the changes are not reflected in the storage, atleast not immediately.
// It is noticed however that if we reset the storage first and then update it, it works.
// https://github.com/microsoft/vscode/issues/171827
traceVerbose('Storage update failed for key', this.key, ' retrying by resetting first');
await this.updateValue(undefined as any, false);
await this.updateValue(newValue, false);
if (JSON.stringify(this.value) != JSON.stringify(newValue)) {
traceWarn('Retry failed, storage update failed for key', this.key);
}
}
} catch (ex) {
traceError('Error while updating storage for key:', this.key, ex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ export abstract class FSWatchingLocator extends LazyResourceBasedLocator {
}

// Start the FS watchers.
traceVerbose('Getting roots');
let roots = await this.getRoots();
traceVerbose('Found roots');
if (typeof roots === 'string') {
roots = [roots];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ async function setContextForActiveEditor(diagnosticCollection: DiagnosticCollect
}

// undefined here in the logs means no file was selected
traceVerbose(`Clearing context for python dependencies not installed: ${doc?.uri.fsPath}`);
await executeCommand('setContext', DEPS_NOT_INSTALLED_KEY, false);
}

Expand Down

0 comments on commit 82d48b0

Please sign in to comment.