support millisecond resolution and the | separator for ts vs.
content.
everything else in openstack is running at millisecond resolution,
and some times it's actually useful to see that when debugging
gate failures.
Backported from master:80313b24
Change-Id: I2227ab0b4965cd1a24b579bdf2ba8c1f9a432f70
| ... | ... |
@@ -500,9 +500,9 @@ if [[ -n "$LOGFILE" ]]; then |
| 500 | 500 |
# Redirect stdout/stderr to tee to write the log file |
| 501 | 501 |
exec 1> >( awk ' |
| 502 | 502 |
{
|
| 503 |
- cmd ="date +\"%Y-%m-%d %H:%M:%S \"" |
|
| 503 |
+ cmd ="date +\"%Y-%m-%d %H:%M:%S.%3N | \"" |
|
| 504 | 504 |
cmd | getline now |
| 505 |
- close("date +\"%Y-%m-%d %H:%M:%S \"")
|
|
| 505 |
+ close("date +\"%Y-%m-%d %H:%M:%S.%3N | \"")
|
|
| 506 | 506 |
sub(/^/, now) |
| 507 | 507 |
|
| 508 | 508 |
fflush() |