mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Changed to use select-object to filter the log properties
This commit is contained in:
parent
ed43a6c039
commit
a97d544475
@ -204,7 +204,7 @@ function save-logs() {
|
||||
function export-windows-docker-event-log() {
|
||||
local -r node="${1}"
|
||||
|
||||
local -r powershell_cmd="powershell.exe -Command \$logs=\$(Get-EventLog -LogName Application -Source Docker); foreach (\$log in \$logs) {Add-Content '${WINDOWS_LOGS_DIR}\\docker.log' \$(Write-Output \$log.TimeGenerated \$log.Message)}"
|
||||
local -r powershell_cmd="powershell.exe -Command \"\$logs=\$(Get-EventLog -LogName Application -Source Docker | Select-Object -Property TimeGenerated, Message); \$logs | Out-File -FilePath '${WINDOWS_LOGS_DIR}\\docker.log'\""
|
||||
|
||||
# Retry up to 3 times to allow ssh keys to be properly propagated and
|
||||
# stored.
|
||||
|
Loading…
Reference in New Issue
Block a user