Skip to content

Commit

Permalink
Stop Diagnostic logging from logging to stdio when the communication …
Browse files Browse the repository at this point in the history
…protocol is set to stdio (#709)
  • Loading branch information
TylerLeonhardt authored Jul 25, 2018
1 parent 87376c3 commit d0899f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions module/PowerShellEditorServices/Start-EditorServices.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ param(
$DEFAULT_USER_MODE = "600"

if ($LogLevel -eq "Diagnostic") {
$VerbosePreference = 'Continue'
if (!$Stdio.IsPresent) {
$VerbosePreference = 'Continue'
}
$scriptName = [System.IO.Path]::GetFileNameWithoutExtension($MyInvocation.MyCommand.Name)
$logFileName = [System.IO.Path]::GetFileName($LogPath)
Start-Transcript (Join-Path (Split-Path $LogPath -Parent) "$scriptName-$logFileName") -Force
Start-Transcript (Join-Path (Split-Path $LogPath -Parent) "$scriptName-$logFileName") -Force | Out-Null
}

function LogSection([string]$msg) {
Expand Down

0 comments on commit d0899f7

Please sign in to comment.