diff --git a/src/vs/code/electron-browser/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcessMain.ts index bd425f7a1f7..e6ff2f71042 100644 --- a/src/vs/code/electron-browser/sharedProcessMain.ts +++ b/src/vs/code/electron-browser/sharedProcessMain.ts @@ -36,7 +36,7 @@ import { ipcRenderer } from 'electron'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { createSharedProcessContributions } from 'vs/code/electron-browser/contrib/contributions'; import { SpdLogService } from 'vs/platform/log/node/spdlogService'; -import { ILogService } from 'vs/platform/log/common/log'; +import { ILogService, registerGlobalLogService } from 'vs/platform/log/common/log'; export interface ISharedProcessConfiguration { readonly machineId: string; @@ -80,6 +80,8 @@ function main(server: Server, initData: ISharedProcessInitData, configuration: I const environmentService = new EnvironmentService(initData.args, process.execPath); const logService = new SpdLogService('sharedprocess', environmentService); + registerGlobalLogService(logService); + logService.info('main', JSON.stringify(configuration)); services.set(IEnvironmentService, environmentService); diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts index e04b1b6490d..0da58ea7ce7 100644 --- a/src/vs/code/electron-main/main.ts +++ b/src/vs/code/electron-main/main.ts @@ -20,7 +20,7 @@ import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiati import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; -import { ILogService, LegacyLogMainService, MultiplexLogService } from 'vs/platform/log/common/log'; +import { ILogService, LegacyLogMainService, MultiplexLogService, registerGlobalLogService } from 'vs/platform/log/common/log'; import { StateService } from 'vs/platform/state/node/stateService'; import { IStateService } from 'vs/platform/state/common/state'; import { IBackupMainService } from 'vs/platform/backup/common/backup'; @@ -51,6 +51,7 @@ function createServices(args: ParsedArgs): IInstantiationService { const spdlogService = new SpdLogService('main', environmentService); const legacyLogService = new LegacyLogMainService(environmentService); const logService = new MultiplexLogService([legacyLogService, spdlogService]); + registerGlobalLogService(logService); // Eventually cleanup setTimeout(() => spdlogService.cleanup().then(null, err => console.error(err)), 10000); diff --git a/src/vs/platform/commands/common/commandService.ts b/src/vs/platform/commands/common/commandService.ts index a8fc43ad4da..ab1c14271a7 100644 --- a/src/vs/platform/commands/common/commandService.ts +++ b/src/vs/platform/commands/common/commandService.ts @@ -11,7 +11,7 @@ import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import Event, { Emitter } from 'vs/base/common/event'; import { Disposable } from 'vs/base/common/lifecycle'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; -import { log, LogLevel, ILogService } from 'vs/platform/log/common/log'; +import { log, LogLevel } from 'vs/platform/log/common/log'; export class CommandService extends Disposable implements ICommandService { @@ -25,9 +25,7 @@ export class CommandService extends Disposable implements ICommandService { constructor( @IInstantiationService private _instantiationService: IInstantiationService, @IExtensionService private _extensionService: IExtensionService, - @IContextKeyService private _contextKeyService: IContextKeyService, - // @ts-ignore - @ILogService private logService: ILogService + @IContextKeyService private _contextKeyService: IContextKeyService ) { super(); this._extensionService.whenInstalledExtensionsRegistered().then(value => this._extensionHostIsReady = value); diff --git a/src/vs/platform/commands/test/commandService.test.ts b/src/vs/platform/commands/test/commandService.test.ts index 78207993cb0..27d613f04bd 100644 --- a/src/vs/platform/commands/test/commandService.test.ts +++ b/src/vs/platform/commands/test/commandService.test.ts @@ -16,7 +16,6 @@ import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyServ import { SimpleConfigurationService } from 'vs/editor/standalone/browser/simpleServices'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import Event, { Emitter } from 'vs/base/common/event'; -import { NoopLogService } from 'vs/platform/log/common/log'; class SimpleExtensionService implements IExtensionService { _serviceBrand: any; @@ -75,7 +74,7 @@ suite('CommandService', function () { lastEvent = activationEvent; return super.activateByEvent(activationEvent); } - }, new ContextKeyService(new SimpleConfigurationService()), new NoopLogService()); + }, new ContextKeyService(new SimpleConfigurationService())); return service.executeCommand('foo').then(() => { assert.ok(lastEvent, 'onCommand:foo'); @@ -93,7 +92,7 @@ suite('CommandService', function () { activateByEvent(activationEvent: string): TPromise { return TPromise.wrapError(new Error('bad_activate')); } - }, new ContextKeyService(new SimpleConfigurationService()), new NoopLogService()); + }, new ContextKeyService(new SimpleConfigurationService())); return service.executeCommand('foo').then(() => assert.ok(false), err => { assert.equal(err.message, 'bad_activate'); @@ -109,7 +108,7 @@ suite('CommandService', function () { whenInstalledExtensionsRegistered() { return new TPromise(_resolve => { /*ignore*/ }); } - }, new ContextKeyService(new SimpleConfigurationService()), new NoopLogService()); + }, new ContextKeyService(new SimpleConfigurationService())); service.executeCommand('bar'); assert.equal(callCounter, 1); @@ -126,7 +125,7 @@ suite('CommandService', function () { whenInstalledExtensionsRegistered() { return new TPromise(_resolve => { resolveFunc = _resolve; }); } - }, new ContextKeyService(new SimpleConfigurationService()), new NoopLogService()); + }, new ContextKeyService(new SimpleConfigurationService())); let r = service.executeCommand('bar'); assert.equal(callCounter, 0); @@ -145,8 +144,7 @@ suite('CommandService', function () { let commandService = new CommandService( new InstantiationService(), new SimpleExtensionService(), - contextKeyService, - new NoopLogService() + contextKeyService ); let counter = 0; diff --git a/src/vs/platform/log/common/log.ts b/src/vs/platform/log/common/log.ts index d0bd8635050..eccfc59db3f 100644 --- a/src/vs/platform/log/common/log.ts +++ b/src/vs/platform/log/common/log.ts @@ -107,6 +107,22 @@ export class MultiplexLogService implements ILogService { } } +export class NoopLogService implements ILogService { + _serviceBrand: any; + trace(message: string, ...args: any[]): void { } + debug(message: string, ...args: any[]): void { } + info(message: string, ...args: any[]): void { } + warn(message: string, ...args: any[]): void { } + error(message: string | Error, ...args: any[]): void { } + critical(message: string | Error, ...args: any[]): void { } +} + +let globalLogService: ILogService = new NoopLogService(); + +export function registerGlobalLogService(logService: ILogService): void { + globalLogService = logService; +} + export function log(level: LogLevel, prefix: string, logFn?: (message: string, ...args: any[]) => string): Function { return createDecorator((fn, key) => { // TODO@Joao: load-time log level? return fn; @@ -119,25 +135,15 @@ export function log(level: LogLevel, prefix: string, logFn?: (message: string, . } switch (level) { - case LogLevel.TRACE: this.logService.trace(message); break; - case LogLevel.DEBUG: this.logService.debug(message); break; - case LogLevel.INFO: this.logService.info(message); break; - case LogLevel.WARN: this.logService.warn(message); break; - case LogLevel.ERROR: this.logService.error(message); break; - case LogLevel.CRITICAL: this.logService.critical(message); break; + case LogLevel.TRACE: globalLogService.trace(message); break; + case LogLevel.DEBUG: globalLogService.debug(message); break; + case LogLevel.INFO: globalLogService.info(message); break; + case LogLevel.WARN: globalLogService.warn(message); break; + case LogLevel.ERROR: globalLogService.error(message); break; + case LogLevel.CRITICAL: globalLogService.critical(message); break; } return fn.apply(this, args); }; }); -} - -export class NoopLogService implements ILogService { - _serviceBrand: any; - trace(message: string, ...args: any[]): void { } - debug(message: string, ...args: any[]): void { } - info(message: string, ...args: any[]): void { } - warn(message: string, ...args: any[]): void { } - error(message: string | Error, ...args: any[]): void { } - critical(message: string | Error, ...args: any[]): void { } } \ No newline at end of file diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index ca3986a30e2..1176cd7393b 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -57,7 +57,6 @@ import { FileChangeType, FileType } from 'vs/platform/files/common/files'; import { ExtHostDecorations } from 'vs/workbench/api/node/extHostDecorations'; import { toGlobPattern, toLanguageSelector } from 'vs/workbench/api/node/extHostTypeConverters'; import { ExtensionActivatedByAPI } from 'vs/workbench/api/node/extHostExtensionActivator'; -import { ILogService } from 'vs/platform/log/common/log'; import { isFalsyOrEmpty } from 'vs/base/common/arrays'; export interface IExtensionApiFactory { @@ -82,8 +81,7 @@ export function createApiFactory( threadService: ExtHostThreadService, extHostWorkspace: ExtHostWorkspace, extHostConfiguration: ExtHostConfiguration, - extensionService: ExtHostExtensionService, - logService: ILogService + extensionService: ExtHostExtensionService ): IExtensionApiFactory { // Addressable instances @@ -94,7 +92,7 @@ export function createApiFactory( const extHostDocumentContentProviders = threadService.set(ExtHostContext.ExtHostDocumentContentProviders, new ExtHostDocumentContentProvider(threadService, extHostDocumentsAndEditors)); const extHostDocumentSaveParticipant = threadService.set(ExtHostContext.ExtHostDocumentSaveParticipant, new ExtHostDocumentSaveParticipant(extHostDocuments, threadService.get(MainContext.MainThreadEditors))); const extHostEditors = threadService.set(ExtHostContext.ExtHostEditors, new ExtHostEditors(threadService, extHostDocumentsAndEditors)); - const extHostCommands = threadService.set(ExtHostContext.ExtHostCommands, new ExtHostCommands(threadService, extHostHeapService, logService)); + const extHostCommands = threadService.set(ExtHostContext.ExtHostCommands, new ExtHostCommands(threadService, extHostHeapService)); const extHostTreeViews = threadService.set(ExtHostContext.ExtHostTreeViews, new ExtHostTreeViews(threadService.get(MainContext.MainThreadTreeViews), extHostCommands)); threadService.set(ExtHostContext.ExtHostWorkspace, extHostWorkspace); const extHostDebugService = threadService.set(ExtHostContext.ExtHostDebugService, new ExtHostDebugService(threadService, extHostWorkspace)); @@ -105,7 +103,7 @@ export function createApiFactory( const extHostFileSystemEvent = threadService.set(ExtHostContext.ExtHostFileSystemEventService, new ExtHostFileSystemEventService()); const extHostQuickOpen = threadService.set(ExtHostContext.ExtHostQuickOpen, new ExtHostQuickOpen(threadService, extHostWorkspace, extHostCommands)); const extHostTerminalService = threadService.set(ExtHostContext.ExtHostTerminalService, new ExtHostTerminalService(threadService)); - const extHostSCM = threadService.set(ExtHostContext.ExtHostSCM, new ExtHostSCM(threadService, extHostCommands, logService)); + const extHostSCM = threadService.set(ExtHostContext.ExtHostSCM, new ExtHostSCM(threadService, extHostCommands)); const extHostTask = threadService.set(ExtHostContext.ExtHostTask, new ExtHostTask(threadService, extHostWorkspace)); const extHostWindow = threadService.set(ExtHostContext.ExtHostWindow, new ExtHostWindow(threadService)); threadService.set(ExtHostContext.ExtHostExtensionService, extensionService); diff --git a/src/vs/workbench/api/node/extHostCommands.ts b/src/vs/workbench/api/node/extHostCommands.ts index abeaf711612..eea488016a7 100644 --- a/src/vs/workbench/api/node/extHostCommands.ts +++ b/src/vs/workbench/api/node/extHostCommands.ts @@ -15,7 +15,7 @@ import { ExtHostHeapService } from 'vs/workbench/api/node/extHostHeapService'; import { isFalsyOrEmpty } from 'vs/base/common/arrays'; import * as modes from 'vs/editor/common/modes'; import * as vscode from 'vscode'; -import { ILogService, log, LogLevel } from 'vs/platform/log/common/log'; +import { log, LogLevel } from 'vs/platform/log/common/log'; interface CommandHandler { callback: Function; @@ -36,9 +36,7 @@ export class ExtHostCommands implements ExtHostCommandsShape { constructor( mainContext: IMainContext, - heapService: ExtHostHeapService, - // @ts-ignore - @ILogService private logService: ILogService + heapService: ExtHostHeapService ) { this._proxy = mainContext.get(MainContext.MainThreadCommands); this._converter = new CommandsConverter(this, heapService); diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index fbda73fac6c..3fbc4e38c27 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -21,7 +21,6 @@ import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; import { realpath } from 'fs'; import { TernarySearchTree } from 'vs/base/common/map'; import { Barrier } from 'vs/base/common/async'; -import { ILogService } from 'vs/platform/log/common/log'; class ExtensionMemento implements IExtensionMemento { @@ -126,8 +125,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { constructor(initData: IInitData, threadService: ExtHostThreadService, extHostWorkspace: ExtHostWorkspace, - extHostConfiguration: ExtHostConfiguration, - logService: ILogService + extHostConfiguration: ExtHostConfiguration ) { this._barrier = new Barrier(); this._registry = new ExtensionDescriptionRegistry(initData.extensions); @@ -139,7 +137,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { this._activator = null; // initialize API first (i.e. do not release barrier until the API is initialized) - const apiFactory = createApiFactory(initData, threadService, extHostWorkspace, extHostConfiguration, this, logService); + const apiFactory = createApiFactory(initData, threadService, extHostWorkspace, extHostConfiguration, this); initializeExtensionApi(this, apiFactory).then(() => { diff --git a/src/vs/workbench/api/node/extHostSCM.ts b/src/vs/workbench/api/node/extHostSCM.ts index 5159a2e37df..ff108029465 100644 --- a/src/vs/workbench/api/node/extHostSCM.ts +++ b/src/vs/workbench/api/node/extHostSCM.ts @@ -17,7 +17,7 @@ import { sortedDiff } from 'vs/base/common/arrays'; import { comparePaths } from 'vs/base/common/comparers'; import * as vscode from 'vscode'; import { ISplice } from 'vs/base/common/sequence'; -import { log, LogLevel, ILogService } from 'vs/platform/log/common/log'; +import { log, LogLevel } from 'vs/platform/log/common/log'; type ProviderHandle = number; type GroupHandle = number; @@ -444,9 +444,7 @@ export class ExtHostSCM { constructor( mainContext: IMainContext, - private _commands: ExtHostCommands, - // @ts-ignore - @ILogService private logService: ILogService + private _commands: ExtHostCommands ) { this._proxy = mainContext.get(MainContext.MainThreadSCM); diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index 9e0d6cfe85c..0504f085b57 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -42,6 +42,7 @@ import { IWorkspacesService } from 'vs/platform/workspaces/common/workspaces'; import { SpdLogService } from 'vs/platform/log/node/spdlogService'; import fs = require('fs'); +import { registerGlobalLogService } from 'vs/platform/log/common/log'; gracefulFs.gracefulify(fs); // enable gracefulFs const currentWindowId = remote.getCurrentWindow().id; @@ -74,6 +75,8 @@ function openWorkbench(configuration: IWindowConfiguration): TPromise { const environmentService = new EnvironmentService(configuration, configuration.execPath); const logService = new SpdLogService(`renderer${currentWindowId}`, environmentService); + registerGlobalLogService(logService); + logService.info('openWorkbench', JSON.stringify(configuration)); // Since the configuration service is one of the core services that is used in so many places, we initialize it diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index e1e3cc7d688..ecda2c17ed5 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -24,6 +24,7 @@ import * as glob from 'vs/base/common/glob'; import { ExtensionActivatedByEvent } from 'vs/workbench/api/node/extHostExtensionActivator'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import { SpdLogService } from 'vs/platform/log/node/spdlogService'; +import { registerGlobalLogService } from 'vs/platform/log/common/log'; // const nativeExit = process.exit.bind(process); function patchProcess(allowExit: boolean) { @@ -88,10 +89,12 @@ export class ExtensionHostMain { const extHostWorkspace = new ExtHostWorkspace(threadService, initData.workspace); const environmentService = new EnvironmentService(initData.args, initData.execPath); const logService = new SpdLogService(`exthost${initData.windowId}`, environmentService); + registerGlobalLogService(logService); + logService.info('main {0}', initData); this._extHostConfiguration = new ExtHostConfiguration(threadService.get(MainContext.MainThreadConfiguration), extHostWorkspace, initData.configuration); - this._extensionService = new ExtHostExtensionService(initData, threadService, extHostWorkspace, this._extHostConfiguration, logService); + this._extensionService = new ExtHostExtensionService(initData, threadService, extHostWorkspace, this._extHostConfiguration); // error forwarding and stack trace scanning const extensionErrors = new WeakMap(); diff --git a/src/vs/workbench/services/scm/common/scmService.ts b/src/vs/workbench/services/scm/common/scmService.ts index 614c0a4d664..927d86633db 100644 --- a/src/vs/workbench/services/scm/common/scmService.ts +++ b/src/vs/workbench/services/scm/common/scmService.ts @@ -8,7 +8,7 @@ import { IDisposable, toDisposable } from 'vs/base/common/lifecycle'; import Event, { Emitter } from 'vs/base/common/event'; import { ISCMService, ISCMProvider, ISCMInput, ISCMRepository } from './scm'; -import { log, LogLevel, ILogService } from 'vs/platform/log/common/log'; +import { log, LogLevel } from 'vs/platform/log/common/log'; class SCMInput implements ISCMInput { @@ -77,11 +77,6 @@ export class SCMService implements ISCMService { private _onDidRemoveProvider = new Emitter(); get onDidRemoveRepository(): Event { return this._onDidRemoveProvider.event; } - constructor( - // @ts-ignore - @ILogService private logService: ILogService - ) { } - @log(LogLevel.INFO, 'SCMService') registerSCMProvider(provider: ISCMProvider): ISCMRepository { if (this._providerIds.has(provider.id)) { diff --git a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts index 3c1d07155f2..e8c7a63c6fb 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts @@ -32,7 +32,6 @@ import { ExtHostDiagnostics } from 'vs/workbench/api/node/extHostDiagnostics'; import * as vscode from 'vscode'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import 'vs/workbench/parts/search/electron-browser/search.contribution'; -import { NoopLogService } from 'vs/platform/log/common/log'; const defaultSelector = { scheme: 'far' }; const model: EditorCommon.IModel = EditorModel.createFromString( @@ -113,9 +112,8 @@ suite('ExtHostLanguageFeatureCommands', function () { threadService.set(ExtHostContext.ExtHostDocuments, extHostDocuments); const heapService = new ExtHostHeapService(); - const logService = new NoopLogService(); - commands = new ExtHostCommands(threadService, heapService, logService); + commands = new ExtHostCommands(threadService, heapService); threadService.set(ExtHostContext.ExtHostCommands, commands); threadService.setTestInstance(MainContext.MainThreadCommands, inst.createInstance(MainThreadCommands, threadService)); ExtHostApiCommands.register(commands); diff --git a/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts b/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts index 9ea21cf75fa..69759480fc2 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts @@ -12,7 +12,6 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { OneGetThreadService } from './testThreadService'; import { mock } from 'vs/workbench/test/electron-browser/api/mock'; -import { NoopLogService } from 'vs/platform/log/common/log'; suite('ExtHostCommands', function () { @@ -30,7 +29,7 @@ suite('ExtHostCommands', function () { } }; - const commands = new ExtHostCommands(OneGetThreadService(shape), undefined, new NoopLogService()); + const commands = new ExtHostCommands(OneGetThreadService(shape), undefined); commands.registerCommand('foo', (): any => { }).dispose(); assert.equal(lastUnregister, 'foo'); assert.equal(CommandsRegistry.getCommand('foo'), undefined); @@ -51,7 +50,7 @@ suite('ExtHostCommands', function () { } }; - const commands = new ExtHostCommands(OneGetThreadService(shape), undefined, new NoopLogService()); + const commands = new ExtHostCommands(OneGetThreadService(shape), undefined); const reg = commands.registerCommand('foo', (): any => { }); reg.dispose(); reg.dispose(); diff --git a/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts b/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts index e1fb7ffbb5d..d6f2f03381b 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts @@ -44,7 +44,6 @@ import { ExtHostDiagnostics } from 'vs/workbench/api/node/extHostDiagnostics'; import { ExtHostHeapService } from 'vs/workbench/api/node/extHostHeapService'; import * as vscode from 'vscode'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { NoopLogService } from 'vs/platform/log/common/log'; const defaultSelector = { scheme: 'far' }; const model: EditorCommon.IModel = EditorModel.createFromString( @@ -103,7 +102,7 @@ suite('ExtHostLanguageFeatures', function () { const heapService = new ExtHostHeapService(); - const commands = new ExtHostCommands(threadService, heapService, new NoopLogService()); + const commands = new ExtHostCommands(threadService, heapService); threadService.set(ExtHostContext.ExtHostCommands, commands); threadService.setTestInstance(MainContext.MainThreadCommands, inst.createInstance(MainThreadCommands, threadService)); diff --git a/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts b/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts index 317c058be4c..8c11cc413d2 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts @@ -17,7 +17,6 @@ import { TestInstantiationService } from 'vs/platform/instantiation/test/common/ import { MainThreadCommands } from 'vs/workbench/api/electron-browser/mainThreadCommands'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { mock } from 'vs/workbench/test/electron-browser/api/mock'; -import { NoopLogService } from 'vs/platform/log/common/log'; import { TPromise } from 'vs/base/common/winjs.base'; import { TreeItemCollapsibleState, ITreeItem } from 'vs/workbench/common/views'; @@ -66,7 +65,7 @@ suite('ExtHostTreeView', function () { threadService.setTestInstance(MainContext.MainThreadCommands, inst.createInstance(MainThreadCommands, threadService)); target = new RecordingShape(); - testObject = new ExtHostTreeViews(target, new ExtHostCommands(threadService, new ExtHostHeapService(), new NoopLogService())); + testObject = new ExtHostTreeViews(target, new ExtHostCommands(threadService, new ExtHostHeapService())); onDidChangeTreeData = new Emitter(); testObject.registerTreeDataProvider('testDataProvider', aTreeDataProvider());