Merge pull request #79949 from liyanhui1228/firstbranch

Add timestamps to the docker test logs
This commit is contained in:
Kubernetes Prow Robot 2019-07-10 21:39:45 -07:00 committed by GitHub
commit a7c619a158
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,7 +204,7 @@ function save-logs() {
function export-windows-docker-event-log() {
local -r node="${1}"
local -r powershell_cmd="powershell.exe -Command \$log=\$(Get-EventLog -LogName Application -Source Docker); Set-Content '${WINDOWS_LOGS_DIR}\\docker.log' \$log.Message"
local -r powershell_cmd="powershell.exe -Command \"\$logs=\$(Get-EventLog -LogName Application -Source Docker | Select-Object -Property TimeGenerated, EntryType, 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.