#84283 use log service to log

This commit is contained in:
Sandeep Somavarapu
2019-12-10 08:03:30 +01:00
parent b2fcf2d3a2
commit f4fa2da7ae

View File

@@ -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);
}
}