@@ -35,6 +35,8 @@ import { ChoiceCliService } from 'vs/platform/message/node/messageCli';
3535import { getBaseLabel } from 'vs/base/common/labels' ;
3636import { IStateService } from 'vs/platform/state/common/state' ;
3737import { StateService } from 'vs/platform/state/node/stateService' ;
38+ import { SpdLogService } from 'vs/platform/log/node/spdlogService' ;
39+ import { registerGlobalLogService , ILogService } from 'vs/platform/log/common/log' ;
3840
3941const notFound = ( id : string ) => localize ( 'notFound' , "Extension '{0}' not found." , id ) ;
4042const notInstalled = ( id : string ) => localize ( 'notInstalled' , "Extension '{0}' is not installed." , id ) ;
@@ -175,7 +177,15 @@ const eventPrefix = 'monacoworkbench';
175177
176178export function main ( argv : ParsedArgs ) : TPromise < void > {
177179 const services = new ServiceCollection ( ) ;
178- services . set ( IEnvironmentService , new SyncDescriptor ( EnvironmentService , argv , process . execPath ) ) ;
180+
181+ const environmentService = new EnvironmentService ( argv , process . execPath ) ;
182+ const logService = new SpdLogService ( 'cli' , environmentService ) ;
183+ registerGlobalLogService ( logService ) ;
184+
185+ logService . info ( 'main' , argv ) ;
186+
187+ services . set ( IEnvironmentService , environmentService ) ;
188+ services . set ( ILogService , logService ) ;
179189 services . set ( IStateService , new SyncDescriptor ( StateService ) ) ;
180190
181191 const instantiationService : IInstantiationService = new InstantiationService ( services ) ;
0 commit comments