Show logs
Some checks failed
Some checks failed
This commit is contained in:
@@ -9,10 +9,8 @@ $vaultArgs = @(
|
|||||||
"-dev-tls",
|
"-dev-tls",
|
||||||
"-dev-root-token-id=root",
|
"-dev-root-token-id=root",
|
||||||
"-dev-listen-address=127.0.0.1:8200",
|
"-dev-listen-address=127.0.0.1:8200",
|
||||||
">>",
|
"-log-level=debug",
|
||||||
"vault-logs/stdout.log",
|
"-log-file=.\vault-logs\vault.log"
|
||||||
"2>>",
|
|
||||||
"vault-logs/stderr.log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Write-Output "✅ Starting Vault server..."
|
Write-Output "✅ Starting Vault server..."
|
||||||
@@ -31,6 +29,11 @@ if ($vaultProcess) {
|
|||||||
Write-Output "✅ Vault process started with PID: $($vaultProcess.Id)"
|
Write-Output "✅ Vault process started with PID: $($vaultProcess.Id)"
|
||||||
} else {
|
} else {
|
||||||
Write-Output "❌ Could not find Vault process"
|
Write-Output "❌ Could not find Vault process"
|
||||||
|
|
||||||
|
# Show logs
|
||||||
|
Write-Output "=== LOG (last 20 lines) ==="
|
||||||
|
Get-Content ".\vault-logs\vault.log" -ErrorAction SilentlyContinue | Select-Object -Last 20
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,11 +81,8 @@ if (-not $isReady) {
|
|||||||
Get-Process -Id $vaultPid -ErrorAction SilentlyContinue | Format-List *
|
Get-Process -Id $vaultPid -ErrorAction SilentlyContinue | Format-List *
|
||||||
|
|
||||||
# Show logs
|
# Show logs
|
||||||
Write-Output "=== STDOUT (last 20 lines) ==="
|
Write-Output "=== LOG (last 20 lines) ==="
|
||||||
Get-Content "vault-logs/stdout.log" -ErrorAction SilentlyContinue | Select-Object -Last 20
|
Get-Content ".\vault-logs\vault.log" -ErrorAction SilentlyContinue | Select-Object -Last 20
|
||||||
|
|
||||||
Write-Output "=== STDERR (last 20 lines) ==="
|
|
||||||
Get-Content "vault-logs/stderr.log" -ErrorAction SilentlyContinue | Select-Object -Last 20
|
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
Stop-Process -Id $vaultPid -Force -ErrorAction SilentlyContinue
|
Stop-Process -Id $vaultPid -Force -ErrorAction SilentlyContinue
|
||||||
|
Reference in New Issue
Block a user