diff --git a/src/vs/editor/standalone/browser/simpleServices.ts b/src/vs/editor/standalone/browser/simpleServices.ts index 68e4ffbba6219c8fba0ad1a4a6ccc3a212deeb50..87ad2d92ea00e95d2a755e093a82bffac5cf082a 100644 --- a/src/vs/editor/standalone/browser/simpleServices.ts +++ b/src/vs/editor/standalone/browser/simpleServices.ts @@ -46,7 +46,7 @@ import { SimpleServicesNLS } from 'vs/editor/common/standaloneStrings'; import { ClassifiedEvent, StrictPropertyCheck, GDPRClassification } from 'vs/platform/telemetry/common/gdprTypings'; import { basename } from 'vs/base/common/resources'; import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'; -import { NullLogService } from 'vs/platform/log/common/log'; +import { ILogService } from 'vs/platform/log/common/log'; export class SimpleModel implements IResolvedTextEditorModel { @@ -298,9 +298,10 @@ export class StandaloneKeybindingService extends AbstractKeybindingService { commandService: ICommandService, telemetryService: ITelemetryService, notificationService: INotificationService, + logService: ILogService, domNode: HTMLElement ) { - super(contextKeyService, commandService, telemetryService, notificationService, new NullLogService()); + super(contextKeyService, commandService, telemetryService, notificationService, logService); this._cachedResolver = null; this._dynamicKeybindings = []; diff --git a/src/vs/editor/standalone/browser/standaloneServices.ts b/src/vs/editor/standalone/browser/standaloneServices.ts index b8b42dd9a6ce37ca243509fb6cd5719aa7de8791..6baca469b2de6f4b5500699c16d5f718391fd0a2 100644 --- a/src/vs/editor/standalone/browser/standaloneServices.ts +++ b/src/vs/editor/standalone/browser/standaloneServices.ts @@ -32,7 +32,7 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ILabelService } from 'vs/platform/label/common/label'; import { IListService, ListService } from 'vs/platform/list/browser/listService'; -import { ILogService, NullLogService } from 'vs/platform/log/common/log'; +import { ConsoleLogService, ILogService } from 'vs/platform/log/common/log'; import { MarkerService } from 'vs/platform/markers/common/markerService'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { INotificationService } from 'vs/platform/notification/common/notification'; @@ -153,7 +153,7 @@ export module StaticServices { export const standaloneThemeService = define(IStandaloneThemeService, () => new StandaloneThemeServiceImpl()); - export const logService = define(ILogService, () => new NullLogService()); + export const logService = define(ILogService, () => new ConsoleLogService()); export const undoRedoService = define(IUndoRedoService, (o) => new UndoRedoService(dialogService.get(o), notificationService.get(o))); @@ -188,6 +188,7 @@ export class DynamicStandaloneServices extends Disposable { const notificationService = this.get(INotificationService); const telemetryService = this.get(ITelemetryService); const themeService = this.get(IThemeService); + const logService = this.get(ILogService); let ensure = (serviceId: ServiceIdentifier, factory: () => T): T => { let value: T | null = null; @@ -209,7 +210,7 @@ export class DynamicStandaloneServices extends Disposable { let commandService = ensure(ICommandService, () => new StandaloneCommandService(this._instantiationService)); - let keybindingService = ensure(IKeybindingService, () => this._register(new StandaloneKeybindingService(contextKeyService, commandService, telemetryService, notificationService, domElement))); + let keybindingService = ensure(IKeybindingService, () => this._register(new StandaloneKeybindingService(contextKeyService, commandService, telemetryService, notificationService, logService, domElement))); let layoutService = ensure(ILayoutService, () => new SimpleLayoutService(StaticServices.codeEditorService.get(ICodeEditorService), domElement)); diff --git a/src/vs/editor/standalone/test/browser/simpleServices.test.ts b/src/vs/editor/standalone/test/browser/simpleServices.test.ts index 69fb7d8c7099612ea4d6b81a41a79a4ce9e08afd..1a8e27680d24e4ccdc65e0d54b3296e1d4774d82 100644 --- a/src/vs/editor/standalone/test/browser/simpleServices.test.ts +++ b/src/vs/editor/standalone/test/browser/simpleServices.test.ts @@ -9,6 +9,7 @@ import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyServ import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding'; +import { NullLogService } from 'vs/platform/log/common/log'; import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils'; suite('StandaloneKeybindingService', () => { @@ -34,7 +35,7 @@ suite('StandaloneKeybindingService', () => { let domElement = document.createElement('div'); - let keybindingService = new TestStandaloneKeybindingService(contextKeyService, commandService, NullTelemetryService, notificationService, domElement); + let keybindingService = new TestStandaloneKeybindingService(contextKeyService, commandService, NullTelemetryService, notificationService, new NullLogService(), domElement); let commandInvoked = false; keybindingService.addDynamicKeybinding('testCommand', KeyCode.F9, () => {