@@ -14,7 +14,6 @@ import { ILogService } from 'vs/platform/log/common/log';
1414import { ExtHostExtensionServiceShape , IInitData , MainContext , MainThreadExtensionServiceShape , MainThreadTelemetryShape , MainThreadWorkspaceShape , IResolveAuthorityResult } from 'vs/workbench/api/common/extHost.protocol' ;
1515import { ExtHostConfiguration , IExtHostConfiguration } from 'vs/workbench/api/common/extHostConfiguration' ;
1616import { ActivatedExtension , EmptyExtension , ExtensionActivatedByAPI , ExtensionActivatedByEvent , ExtensionActivationReason , ExtensionActivationTimes , ExtensionActivationTimesBuilder , ExtensionsActivator , IExtensionAPI , IExtensionContext , IExtensionModule , HostExtension , ExtensionActivationTimesFragment } from 'vs/workbench/api/common/extHostExtensionActivator' ;
17- import { ExtHostLogService } from 'vs/workbench/api/common/extHostLogService' ;
1817import { ExtHostStorage , IExtHostStorage } from 'vs/workbench/api/common/extHostStorage' ;
1918import { ExtHostWorkspace , IExtHostWorkspace } from 'vs/workbench/api/common/extHostWorkspace' ;
2019import { ExtensionActivationError } from 'vs/workbench/services/extensions/common/extensions' ;
@@ -75,7 +74,7 @@ export abstract class AbstractExtHostExtensionService implements ExtHostExtensio
7574 protected readonly _instaService : IInstantiationService ;
7675 protected readonly _extHostWorkspace : ExtHostWorkspace ;
7776 protected readonly _extHostConfiguration : ExtHostConfiguration ;
78- protected readonly _extHostLogService : ExtHostLogService ;
77+ protected readonly _logService : ILogService ;
7978
8079 protected readonly _mainThreadWorkspaceProxy : MainThreadWorkspaceShape ;
8180 protected readonly _mainThreadTelemetryProxy : MainThreadTelemetryShape ;
@@ -102,7 +101,7 @@ export abstract class AbstractExtHostExtensionService implements ExtHostExtensio
102101 @IExtHostRpcService extHostContext : IExtHostRpcService ,
103102 @IExtHostWorkspace extHostWorkspace : IExtHostWorkspace ,
104103 @IExtHostConfiguration extHostConfiguration : IExtHostConfiguration ,
105- @ILogService extHostLogService : ExtHostLogService ,
104+ @ILogService logService : ILogService ,
106105 @IExtHostInitDataService initData : IExtHostInitDataService ,
107106 @IExtensionStoragePaths storagePath : IExtensionStoragePaths
108107 ) {
@@ -112,7 +111,7 @@ export abstract class AbstractExtHostExtensionService implements ExtHostExtensio
112111
113112 this . _extHostWorkspace = extHostWorkspace ;
114113 this . _extHostConfiguration = extHostConfiguration ;
115- this . _extHostLogService = extHostLogService ;
114+ this . _logService = logService ;
116115 this . _disposables = new DisposableStore ( ) ;
117116
118117 this . _mainThreadWorkspaceProxy = this . _extHostContext . getProxy ( MainContext . MainThreadWorkspace ) ;
@@ -329,14 +328,14 @@ export abstract class AbstractExtHostExtensionService implements ExtHostExtensio
329328 return Promise . resolve ( new EmptyExtension ( ExtensionActivationTimes . NONE ) ) ;
330329 }
331330
332- this . _extHostLogService . info ( `ExtensionService#_doActivateExtension ${ extensionDescription . identifier . value } ${ JSON . stringify ( reason ) } ` ) ;
331+ this . _logService . info ( `ExtensionService#_doActivateExtension ${ extensionDescription . identifier . value } ${ JSON . stringify ( reason ) } ` ) ;
333332
334333 const activationTimesBuilder = new ExtensionActivationTimesBuilder ( reason . startup ) ;
335334 return Promise . all < any > ( [
336335 this . _loadCommonJSModule ( extensionDescription . main , activationTimesBuilder ) ,
337336 this . _loadExtensionContext ( extensionDescription )
338337 ] ) . then ( values => {
339- return AbstractExtHostExtensionService . _callActivate ( this . _extHostLogService , extensionDescription . identifier , < IExtensionModule > values [ 0 ] , < IExtensionContext > values [ 1 ] , activationTimesBuilder ) ;
338+ return AbstractExtHostExtensionService . _callActivate ( this . _logService , extensionDescription . identifier , < IExtensionModule > values [ 0 ] , < IExtensionContext > values [ 1 ] , activationTimesBuilder ) ;
340339 } ) ;
341340 }
342341
@@ -347,7 +346,7 @@ export abstract class AbstractExtHostExtensionService implements ExtHostExtensio
347346 const globalState = new ExtensionMemento ( extensionDescription . identifier . value , true , this . _storage ) ;
348347 const workspaceState = new ExtensionMemento ( extensionDescription . identifier . value , false , this . _storage ) ;
349348
350- this . _extHostLogService . trace ( `ExtensionService#loadExtensionContext ${ extensionDescription . identifier . value } ` ) ;
349+ this . _logService . trace ( `ExtensionService#loadExtensionContext ${ extensionDescription . identifier . value } ` ) ;
351350 return Promise . all ( [
352351 globalState . whenReady ,
353352 workspaceState . whenReady ,
@@ -359,10 +358,10 @@ export abstract class AbstractExtHostExtensionService implements ExtHostExtensio
359358 workspaceState,
360359 subscriptions : [ ] ,
361360 get extensionPath ( ) { return extensionDescription . extensionLocation . fsPath ; } ,
362- storagePath : this . _storagePath . workspaceValue ( extensionDescription ) ,
363- globalStoragePath : this . _storagePath . globalValue ( extensionDescription ) ,
361+ get storagePath ( ) { return that . _storagePath . workspaceValue ( extensionDescription ) ; } ,
362+ get globalStoragePath ( ) { return that . _storagePath . globalValue ( extensionDescription ) ; } ,
364363 asAbsolutePath : ( relativePath : string ) => { return path . join ( extensionDescription . extensionLocation . fsPath , relativePath ) ; } ,
365- logPath : that . _extHostLogService . getLogDirectory ( extensionDescription . identifier ) ,
364+ get logPath ( ) { return path . join ( that . _initData . logsLocation . fsPath , extensionDescription . identifier . value ) ; } ,
366365 executionContext : this . _initData . remote . isRemote ? ExtensionExecutionContext . Remote : ExtensionExecutionContext . Local ,
367366 } ) ;
368367 } ) ;
@@ -479,7 +478,7 @@ export abstract class AbstractExtHostExtensionService implements ExtHostExtensio
479478 }
480479
481480 private async _activateIfGlobPatterns ( folders : ReadonlyArray < vscode . WorkspaceFolder > , extensionId : ExtensionIdentifier , globPatterns : string [ ] ) : Promise < void > {
482- this . _extHostLogService . trace ( `extensionHostMain#activateIfGlobPatterns: fileSearch, extension: ${ extensionId . value } , entryPoint: workspaceContains` ) ;
481+ this . _logService . trace ( `extensionHostMain#activateIfGlobPatterns: fileSearch, extension: ${ extensionId . value } , entryPoint: workspaceContains` ) ;
483482
484483 if ( globPatterns . length === 0 ) {
485484 return Promise . resolve ( undefined ) ;
@@ -606,7 +605,7 @@ export abstract class AbstractExtHostExtensionService implements ExtHostExtensio
606605 . then ( ( ) => this . _handleEagerExtensions ( ) )
607606 . then ( ( ) => this . _handleExtensionTests ( ) )
608607 . then ( ( ) => {
609- this . _extHostLogService . info ( `eager extensions activated` ) ;
608+ this . _logService . info ( `eager extensions activated` ) ;
610609 } ) ;
611610 }
612611
0 commit comments