Add timestamp to the docker test logs

This commit is contained in:
Angela Li 2019-07-09 17:31:24 -07:00
parent 33541bdd34
commit ed43a6c039

View File

@ -204,7 +204,7 @@ function save-logs() {
function export-windows-docker-event-log() { function export-windows-docker-event-log() {
local -r node="${1}" 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); foreach (\$log in \$logs) {Add-Content '${WINDOWS_LOGS_DIR}\\docker.log' \$(Write-Output \$log.TimeGenerated \$log.Message)}"
# Retry up to 3 times to allow ssh keys to be properly propagated and # Retry up to 3 times to allow ssh keys to be properly propagated and
# stored. # stored.