mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-12 01:49:38 -05:00
💄
This commit is contained in:
@@ -38,8 +38,8 @@ import { ipcRenderer } from 'electron';
|
||||
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, LogLevel } from 'vs/platform/log/common/log';
|
||||
import { LogLevelSetterChannelClient } from 'vs/platform/log/common/logIpc';
|
||||
import { ILogService, LogLevel } from 'vs/platform/log/common/log';
|
||||
import { LogLevelSetterChannelClient, FollowerLogService } from 'vs/platform/log/common/logIpc';
|
||||
|
||||
export interface ISharedProcessConfiguration {
|
||||
readonly machineId: string;
|
||||
|
||||
@@ -23,15 +23,12 @@ export enum LogLevel {
|
||||
Off
|
||||
}
|
||||
|
||||
export interface ILogLevelSetter {
|
||||
onDidChangeLogLevel: Event<LogLevel>;
|
||||
setLevel(level: LogLevel): void;
|
||||
}
|
||||
|
||||
export interface ILogService extends ILogLevelSetter, IDisposable {
|
||||
export interface ILogService extends IDisposable {
|
||||
_serviceBrand: any;
|
||||
onDidChangeLogLevel: Event<LogLevel>;
|
||||
|
||||
getLevel(): LogLevel;
|
||||
setLevel(level: LogLevel): void;
|
||||
trace(message: string, ...args: any[]): void;
|
||||
debug(message: string, ...args: any[]): void;
|
||||
info(message: string, ...args: any[]): void;
|
||||
@@ -290,19 +287,6 @@ export class DelegatedLogService extends Disposable implements ILogService {
|
||||
}
|
||||
}
|
||||
|
||||
export class FollowerLogService extends DelegatedLogService implements ILogService {
|
||||
_serviceBrand: any;
|
||||
|
||||
constructor(private master: ILogLevelSetter, logService: ILogService) {
|
||||
super(logService);
|
||||
this._register(master.onDidChangeLogLevel(level => logService.setLevel(level)));
|
||||
}
|
||||
|
||||
setLevel(level: LogLevel): void {
|
||||
this.master.setLevel(level);
|
||||
}
|
||||
}
|
||||
|
||||
export class NullLogService implements ILogService {
|
||||
_serviceBrand: any;
|
||||
readonly onDidChangeLogLevel: Event<LogLevel> = new Emitter<LogLevel>().event;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { IChannel, eventToCall, eventFromCall } from 'vs/base/parts/ipc/common/ipc';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { LogLevel, ILogService, ILogLevelSetter } from 'vs/platform/log/common/log';
|
||||
import { LogLevel, ILogService, DelegatedLogService } from 'vs/platform/log/common/log';
|
||||
import Event, { buffer } from 'vs/base/common/event';
|
||||
|
||||
export interface ILogLevelSetterChannel extends IChannel {
|
||||
@@ -30,7 +30,7 @@ export class LogLevelSetterChannel implements ILogLevelSetterChannel {
|
||||
}
|
||||
}
|
||||
|
||||
export class LogLevelSetterChannelClient implements ILogLevelSetter {
|
||||
export class LogLevelSetterChannelClient {
|
||||
|
||||
constructor(private channel: ILogLevelSetterChannel) { }
|
||||
|
||||
@@ -40,4 +40,17 @@ export class LogLevelSetterChannelClient implements ILogLevelSetter {
|
||||
setLevel(level: LogLevel): TPromise<void> {
|
||||
return this.channel.call('setLevel', level);
|
||||
}
|
||||
}
|
||||
|
||||
export class FollowerLogService extends DelegatedLogService implements ILogService {
|
||||
_serviceBrand: any;
|
||||
|
||||
constructor(private master: LogLevelSetterChannelClient, logService: ILogService) {
|
||||
super(logService);
|
||||
this._register(master.onDidChangeLogLevel(level => logService.setLevel(level)));
|
||||
}
|
||||
|
||||
setLevel(level: LogLevel): void {
|
||||
this.master.setLevel(level);
|
||||
}
|
||||
}
|
||||
@@ -43,10 +43,10 @@ import { IWorkspacesService } from 'vs/platform/workspaces/common/workspaces';
|
||||
import { createSpdLogService } from 'vs/platform/log/node/spdlogService';
|
||||
|
||||
import fs = require('fs');
|
||||
import { ConsoleLogService, MultiplexLogService, ILogService, FollowerLogService } from 'vs/platform/log/common/log';
|
||||
import { ConsoleLogService, MultiplexLogService, ILogService } from 'vs/platform/log/common/log';
|
||||
import { IssueChannelClient } from 'vs/platform/issue/common/issueIpc';
|
||||
import { IIssueService } from 'vs/platform/issue/common/issue';
|
||||
import { LogLevelSetterChannelClient } from 'vs/platform/log/common/logIpc';
|
||||
import { LogLevelSetterChannelClient, FollowerLogService } from 'vs/platform/log/common/logIpc';
|
||||
gracefulFs.gracefulify(fs); // enable gracefulFs
|
||||
|
||||
export function startup(configuration: IWindowConfiguration): TPromise<void> {
|
||||
|
||||
Reference in New Issue
Block a user