mirror of
https://github.com/ptarmiganlabs/butler-sos.git
synced 2025-12-19 17:58:18 -05:00
Enhance error logging in log monitoring by capturing full exception details
This commit is contained in:
15
.github/workflows/butler-sos-log-monitor.yaml
vendored
15
.github/workflows/butler-sos-log-monitor.yaml
vendored
@@ -188,12 +188,15 @@ jobs:
|
||||
}
|
||||
|
||||
} catch {
|
||||
$errorMsg = $_.Exception.Message
|
||||
$stackTrace = $_.Exception.StackTrace
|
||||
Write-Host ("❌ Failed to check log files: " + $errorMsg) -ForegroundColor Red
|
||||
Write-Host ("Stack trace: " + $stackTrace) -ForegroundColor Red
|
||||
Write-Host ("::error::Log monitoring failed - " + $errorMsg)
|
||||
exit 1
|
||||
# Log FULL exception details for debugging
|
||||
Write-Host ("Full exception: " + $_.Exception.ToString()) -ForegroundColor Red
|
||||
|
||||
$errorMsg = $_.Exception.Message
|
||||
$stack = $_.Exception.StackTrace
|
||||
Write-Host ("❌ Failed to check log files: " + $errorMsg) -ForegroundColor Red
|
||||
Write-Host ("Stack trace: " + $stack) -ForegroundColor Red
|
||||
Write-Host ("::error::Log monitoring failed - " + $errorMsg)
|
||||
exit 1
|
||||
}
|
||||
|
||||
- name: Stop Butler SOS service if errors found
|
||||
|
||||
Reference in New Issue
Block a user