@@ -31,13 +31,13 @@ import { IFileService } from 'vs/platform/files/common/files';
3131import { IPanel } from 'vs/workbench/common/panel' ;
3232import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput' ;
3333import { IEnvironmentService } from 'vs/platform/environment/common/environment' ;
34- import { RotatingLogger } from 'spdlog' ;
3534import { toLocalISOString } from 'vs/base/common/date' ;
3635import { IWindowService } from 'vs/platform/windows/common/windows' ;
37- import { ILogService } from 'vs/platform/log/common/log' ;
36+ import { ILogService , IOutputWriter } from 'vs/platform/log/common/log' ;
3837import { Schemas } from 'vs/base/common/network' ;
3938import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle' ;
4039import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey' ;
40+ import { createSpdLogOutputWriter } from 'vs/platform/log/node/spdlogService' ;
4141
4242const OUTPUT_ACTIVE_CHANNEL_KEY = 'output.activechannel' ;
4343
@@ -201,7 +201,7 @@ abstract class AbstractFileOutputChannel extends Disposable {
201201 */
202202class OutputChannelBackedByFile extends AbstractFileOutputChannel implements OutputChannel {
203203
204- private outputWriter : RotatingLogger ;
204+ private outputWriter : IOutputWriter ;
205205 private appendedMessage = '' ;
206206 private loadingFromFileInProgress : boolean = false ;
207207 private resettingDelayer : ThrottledDelayer < void > ;
@@ -219,7 +219,7 @@ class OutputChannelBackedByFile extends AbstractFileOutputChannel implements Out
219219 super ( { ...outputChannelIdentifier , file : URI . file ( paths . join ( outputDir , `${ outputChannelIdentifier . id } .log` ) ) } , modelUri , OUTPUT_MIME , fileService , modelService , modeService ) ;
220220
221221 // Use one rotating file to check for main file reset
222- this . outputWriter = new RotatingLogger ( this . id , this . file . fsPath , 1024 * 1024 * 30 , 1 ) ;
222+ this . outputWriter = createSpdLogOutputWriter ( this . id , this . file . fsPath , 1024 * 1024 * 30 , 1 ) ;
223223 this . outputWriter . clearFormatters ( ) ;
224224 this . rotatingFilePath = `${ outputChannelIdentifier . id } .1.log` ;
225225 this . _register ( watchOutputDirectory ( paths . dirname ( this . file . fsPath ) , logService , ( eventType , file ) => this . onFileChangedInOutputDirector ( eventType , file ) ) ) ;
0 commit comments