mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
#84283 use log service to log
This commit is contained in:
@@ -14,6 +14,7 @@ import { AbstractExtHostOutputChannel, ExtHostPushOutputChannel, ExtHostOutputSe
|
||||
import { IExtHostInitDataService } from 'vs/workbench/api/common/extHostInitDataService';
|
||||
import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService';
|
||||
import { MutableDisposable } from 'vs/base/common/lifecycle';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
|
||||
export class ExtHostOutputChannelBackedByFile extends AbstractExtHostOutputChannel {
|
||||
|
||||
@@ -55,6 +56,7 @@ export class ExtHostOutputService2 extends ExtHostOutputService {
|
||||
|
||||
constructor(
|
||||
@IExtHostRpcService extHostRpc: IExtHostRpcService,
|
||||
@ILogService private readonly logService: ILogService,
|
||||
@IExtHostInitDataService initData: IExtHostInitDataService,
|
||||
) {
|
||||
super(extHostRpc);
|
||||
@@ -90,7 +92,7 @@ export class ExtHostOutputService2 extends ExtHostOutputService {
|
||||
return new ExtHostOutputChannelBackedByFile(name, appender, this._proxy);
|
||||
} catch (error) {
|
||||
// Do not crash if logger cannot be created
|
||||
console.log(error);
|
||||
this.logService.error(error);
|
||||
return new ExtHostPushOutputChannel(name, this._proxy);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user