Skip to content

Commit 96433c5

Browse files
committed
[vscode] Bugfix mergeVscodeLogs.
1 parent a765308 commit 96433c5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

VSCode/mergeVscodeLogs.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ if ($logFiles.Count -lt 2) {
7777
# Log entries from all files
7878
[List[psobject]]$logEntries = @()
7979

80-
foreach ($logfile in $logFiles) {
81-
[string]$content = Get-Content $logFile.Path -Raw
80+
for ([int]$i = 0; $i -lt $logFiles.Count; $i++) {
81+
[string]$content = Get-Content $logFiles[$i].Path -Raw
8282
if (-not $content) { continue } # Can be empty
83-
[string]$name = $logFile.Name
83+
[string]$name = $logFiles[$i].Name
8484

8585
[Match]$m = [regex]::Match($content, '^(?<stamp>\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\.\d\d\d) \[[A-Za-z]+\]')
8686
if (-not $m.Success) {
87-
Write-Warning "Skipping log with non-standard format $($logFile.Path)"
87+
Write-Warning "Skipping log with non-standard format $($logFiles[$i].Path)"
8888
continue
8989
}
9090

0 commit comments

Comments
 (0)