diff --git a/module/PowerShellEditorServices/Start-EditorServices.ps1 b/module/PowerShellEditorServices/Start-EditorServices.ps1 index 3c1e3eec1..6e0cd3e0a 100644 --- a/module/PowerShellEditorServices/Start-EditorServices.ps1 +++ b/module/PowerShellEditorServices/Start-EditorServices.ps1 @@ -80,7 +80,9 @@ $maxPortNumber = 30000 if ($LogLevel -eq "Diagnostic") { $VerbosePreference = 'Continue' - Start-Transcript (Join-Path (Split-Path $LogPath -Parent) Start-EditorServices.log) -Force + $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 } function LogSection([string]$msg) {