#39574 Define interface ILogLevelSetter

This commit is contained in:
Sandeep Somavarapu
2018-01-23 18:50:45 +01:00
parent 7155f39d03
commit f2b303f3cc
5 changed files with 33 additions and 23 deletions

View File

@@ -39,7 +39,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { createSharedProcessContributions } from 'vs/code/electron-browser/sharedProcess/contrib/contributions';
import { createSpdLogService } from 'vs/platform/log/node/spdlogService';
import { ILogService, FollowerLogService } from 'vs/platform/log/common/log';
import { LogLevelChannelClient } from 'vs/platform/log/common/logIpc';
import { LogLevelSetterChannelClient } from 'vs/platform/log/common/logIpc';
export interface ISharedProcessConfiguration {
readonly machineId: string;
@@ -82,7 +82,7 @@ function main(server: Server, initData: ISharedProcessInitData, configuration: I
const services = new ServiceCollection();
const environmentService = new EnvironmentService(initData.args, process.execPath);
const logLevelClient = new LogLevelChannelClient(server.getChannel('loglevel', { route: () => 'main' }));
const logLevelClient = new LogLevelSetterChannelClient(server.getChannel('loglevel', { route: () => 'main' }));
const logService = new FollowerLogService(logLevelClient, createSpdLogService('sharedprocess', environmentService));
process.once('exit', () => logService.dispose());