Add a timestamp to the log output for better diagnosis
when we are looking at logs generated by the gate jobs we need timestamps on the output of stack.sh so we can figure out what was being executed around the time when there was a problem in say nova-network Change-Id: I203e8dae97715d6ee46a4088c7577b9be66cf09d
This commit is contained in:
parent
9b243b32cc
commit
e5eee5834b
10
stack.sh
10
stack.sh
@ -598,7 +598,15 @@ if [[ -n "$LOGFILE" ]]; then
|
||||
exec 3>&1
|
||||
if [[ "$VERBOSE" == "True" ]]; then
|
||||
# Redirect stdout/stderr to tee to write the log file
|
||||
exec 1> >( tee "${LOGFILE}" ) 2>&1
|
||||
exec 1> >( awk '
|
||||
{
|
||||
cmd ="date +\"%Y-%m-%d %H:%M:%S \""
|
||||
cmd | getline now
|
||||
close("date +\"%Y-%m-%d %H:%M:%S \"")
|
||||
sub(/^/, now)
|
||||
print
|
||||
fflush()
|
||||
}' | tee "${LOGFILE}" ) 2>&1
|
||||
# Set up a second fd for output
|
||||
exec 6> >( tee "${SUMFILE}" )
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user