Skip to content

Commit

Permalink
user LogService in extHostDecorations, #84283
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Nov 11, 2019
1 parent 7417a29 commit 296d7eb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/vs/workbench/api/common/extHostDecorations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
import { asArray } from 'vs/base/common/arrays';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService';
import { ILogService } from 'vs/platform/log/common/log';

interface ProviderData {
provider: vscode.DecorationProvider;
Expand All @@ -28,6 +29,7 @@ export class ExtHostDecorations implements IExtHostDecorations {

constructor(
@IExtHostRpcService extHostRpc: IExtHostRpcService,
@ILogService private readonly _logService: ILogService,
) {
this._proxy = extHostRpc.getProxy(MainContext.MainThreadDecorations);
}
Expand Down Expand Up @@ -66,10 +68,10 @@ export class ExtHostDecorations implements IExtHostDecorations {
Decoration.validate(data);
result[id] = <DecorationData>[data.priority, data.bubble, data.title, data.letter, data.color];
} catch (e) {
console.warn(`INVALID decoration from extension '${extensionId.value}': ${e}`);
this._logService.warn(`INVALID decoration from extension '${extensionId.value}': ${e}`);
}
}, err => {
console.error(err);
this._logService.error(err);
});

})).then(() => {
Expand Down

0 comments on commit 296d7eb

Please sign in to comment.