@@ -138,7 +138,7 @@ public StartEditorServicesCommand()
138
138
/// The minimum log level that should be emitted.
139
139
/// </summary>
140
140
[ Parameter ]
141
- public PsesLogLevel LogLevel { get ; set ; } = PsesLogLevel . Normal ;
141
+ public PsesLogLevel LogLevel { get ; set ; } = PsesLogLevel . Warning ;
142
142
143
143
/// <summary>
144
144
/// Paths to additional PowerShell modules to be imported at startup.
@@ -218,7 +218,7 @@ protected override void BeginProcessing()
218
218
[ System . Diagnostics . CodeAnalysis . SuppressMessage ( "Usage" , "VSTHRD002:Avoid problematic synchronous waits" , Justification = "We have to wait here, it's the whole program." ) ]
219
219
protected override void EndProcessing ( )
220
220
{
221
- _logger . Log ( PsesLogLevel . Diagnostic , "Beginning EndProcessing block" ) ;
221
+ _logger . Log ( PsesLogLevel . Trace , "Beginning EndProcessing block" ) ;
222
222
try
223
223
{
224
224
// First try to remove PSReadLine to decomplicate startup
@@ -229,7 +229,7 @@ protected override void EndProcessing()
229
229
EditorServicesConfig editorServicesConfig = CreateConfigObject ( ) ;
230
230
231
231
using EditorServicesLoader psesLoader = EditorServicesLoader . Create ( _logger , editorServicesConfig , SessionDetailsPath , _loggerUnsubscribers ) ;
232
- _logger . Log ( PsesLogLevel . Verbose , "Loading EditorServices" ) ;
232
+ _logger . Log ( PsesLogLevel . Debug , "Loading EditorServices" ) ;
233
233
// Synchronously start editor services and wait here until it shuts down.
234
234
psesLoader . LoadAndRunEditorServicesAsync ( ) . GetAwaiter ( ) . GetResult ( ) ;
235
235
}
@@ -281,7 +281,7 @@ private void StartLogging()
281
281
IDisposable fileLoggerUnsubscriber = _logger . Subscribe ( fileLogger ) ;
282
282
fileLogger . AddUnsubscriber ( fileLoggerUnsubscriber ) ;
283
283
_loggerUnsubscribers . Add ( fileLoggerUnsubscriber ) ;
284
- _logger . Log ( PsesLogLevel . Diagnostic , "Logging started" ) ;
284
+ _logger . Log ( PsesLogLevel . Trace , "Logging started" ) ;
285
285
}
286
286
287
287
// Sanitizes user input and ensures the directory is created.
@@ -299,7 +299,7 @@ private string GetLogDirPath()
299
299
300
300
private void RemovePSReadLineForStartup ( )
301
301
{
302
- _logger . Log ( PsesLogLevel . Verbose , "Removing PSReadLine" ) ;
302
+ _logger . Log ( PsesLogLevel . Debug , "Removing PSReadLine" ) ;
303
303
using SMA . PowerShell pwsh = SMA . PowerShell . Create ( RunspaceMode . CurrentRunspace ) ;
304
304
bool hasPSReadLine = pwsh . AddCommand ( new CmdletInfo ( @"Microsoft.PowerShell.Core\Get-Module" , typeof ( GetModuleCommand ) ) )
305
305
. AddParameter ( "Name" , "PSReadLine" )
@@ -314,13 +314,13 @@ private void RemovePSReadLineForStartup()
314
314
. AddParameter ( "Name" , "PSReadLine" )
315
315
. AddParameter ( "ErrorAction" , "SilentlyContinue" ) ;
316
316
317
- _logger . Log ( PsesLogLevel . Verbose , "Removed PSReadLine" ) ;
317
+ _logger . Log ( PsesLogLevel . Debug , "Removed PSReadLine" ) ;
318
318
}
319
319
}
320
320
321
321
private EditorServicesConfig CreateConfigObject ( )
322
322
{
323
- _logger . Log ( PsesLogLevel . Diagnostic , "Creating host configuration" ) ;
323
+ _logger . Log ( PsesLogLevel . Trace , "Creating host configuration" ) ;
324
324
325
325
string bundledModulesPath = BundledModulesPath ;
326
326
if ( ! Path . IsPathRooted ( bundledModulesPath ) )
@@ -399,31 +399,31 @@ private string GetProfilePathFromProfileObject(PSObject profileObject, ProfileUs
399
399
// * On Linux or macOS on any version greater than or equal to 7
400
400
private ConsoleReplKind GetReplKind ( )
401
401
{
402
- _logger . Log ( PsesLogLevel . Diagnostic , "Determining REPL kind" ) ;
402
+ _logger . Log ( PsesLogLevel . Trace , "Determining REPL kind" ) ;
403
403
404
404
if ( Stdio || ! EnableConsoleRepl )
405
405
{
406
- _logger . Log ( PsesLogLevel . Diagnostic , "REPL configured as None" ) ;
406
+ _logger . Log ( PsesLogLevel . Trace , "REPL configured as None" ) ;
407
407
return ConsoleReplKind . None ;
408
408
}
409
409
410
410
if ( UseLegacyReadLine )
411
411
{
412
- _logger . Log ( PsesLogLevel . Diagnostic , "REPL configured as Legacy" ) ;
412
+ _logger . Log ( PsesLogLevel . Trace , "REPL configured as Legacy" ) ;
413
413
return ConsoleReplKind . LegacyReadLine ;
414
414
}
415
415
416
- _logger . Log ( PsesLogLevel . Diagnostic , "REPL configured as PSReadLine" ) ;
416
+ _logger . Log ( PsesLogLevel . Trace , "REPL configured as PSReadLine" ) ;
417
417
return ConsoleReplKind . PSReadLine ;
418
418
}
419
419
420
420
private ITransportConfig GetLanguageServiceTransport ( )
421
421
{
422
- _logger . Log ( PsesLogLevel . Diagnostic , "Configuring LSP transport" ) ;
422
+ _logger . Log ( PsesLogLevel . Trace , "Configuring LSP transport" ) ;
423
423
424
424
if ( DebugServiceOnly )
425
425
{
426
- _logger . Log ( PsesLogLevel . Diagnostic , "No LSP transport: PSES is debug only" ) ;
426
+ _logger . Log ( PsesLogLevel . Trace , "No LSP transport: PSES is debug only" ) ;
427
427
return null ;
428
428
}
429
429
@@ -447,11 +447,11 @@ private ITransportConfig GetLanguageServiceTransport()
447
447
448
448
private ITransportConfig GetDebugServiceTransport ( )
449
449
{
450
- _logger . Log ( PsesLogLevel . Diagnostic , "Configuring debug transport" ) ;
450
+ _logger . Log ( PsesLogLevel . Trace , "Configuring debug transport" ) ;
451
451
452
452
if ( LanguageServiceOnly )
453
453
{
454
- _logger . Log ( PsesLogLevel . Diagnostic , "No Debug transport: PSES is language service only" ) ;
454
+ _logger . Log ( PsesLogLevel . Trace , "No Debug transport: PSES is language service only" ) ;
455
455
return null ;
456
456
}
457
457
@@ -462,7 +462,7 @@ private ITransportConfig GetDebugServiceTransport()
462
462
return new StdioTransportConfig ( _logger ) ;
463
463
}
464
464
465
- _logger . Log ( PsesLogLevel . Diagnostic , "No debug transport: Transport is Stdio with debug disabled" ) ;
465
+ _logger . Log ( PsesLogLevel . Trace , "No debug transport: Transport is Stdio with debug disabled" ) ;
466
466
return null ;
467
467
}
468
468
0 commit comments