提交 39cc093a 编写于 作者: S Sandeep Somavarapu

💄

上级 ef0ae105
...@@ -77,13 +77,13 @@ export class ExtHostPushOutputChannel extends AbstractExtHostOutputChannel { ...@@ -77,13 +77,13 @@ export class ExtHostPushOutputChannel extends AbstractExtHostOutputChannel {
} }
} }
export class ExtHostPullOutputChannel extends AbstractExtHostOutputChannel { export class ExtHostFileOutputChannel extends AbstractExtHostOutputChannel {
private static _namePool = 1; private static _namePool = 1;
private _appender: OutputAppender; private _appender: OutputAppender;
constructor(name: string, outputDir: string, proxy: MainThreadOutputServiceShape) { constructor(name: string, outputDir: string, proxy: MainThreadOutputServiceShape) {
const fileName = `${ExtHostPullOutputChannel._namePool++}-${name}`; const fileName = `${ExtHostFileOutputChannel._namePool++}-${name}`;
const file = URI.file(posix.join(outputDir, `${fileName}.log`)); const file = URI.file(posix.join(outputDir, `${fileName}.log`));
super(name, file, proxy); super(name, file, proxy);
...@@ -111,7 +111,7 @@ export class ExtHostOutputService { ...@@ -111,7 +111,7 @@ export class ExtHostOutputService {
if (!name) { if (!name) {
throw new Error('illegal argument `name`. must not be falsy'); throw new Error('illegal argument `name`. must not be falsy');
} else { } else {
return push ? new ExtHostPushOutputChannel(name, this._proxy) : new ExtHostPullOutputChannel(name, this._outputDir, this._proxy); return push ? new ExtHostPushOutputChannel(name, this._proxy) : new ExtHostFileOutputChannel(name, this._outputDir, this._proxy);
} }
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册