Adding timestamp to _shcommon as log formatter for

troubleshooting

Change-Id: Ie89fc95e5d7f0e4f832bac45f87915893ed79942
This commit is contained in:
Rahul Khiyani 2019-01-15 21:56:12 -05:00
parent 11c6594b7f
commit 87dbc54044
1 changed files with 2 additions and 1 deletions

View File

@ -59,7 +59,8 @@ __text_formatter(){
if [ -n "${color_prefix}" ]; then
color_suffix='\e[0m'
fi
echo -e "${color_prefix}${log_prefix}${1}${color_suffix}" >&${fd}
timestamp=$(date "+%m-%d-%y %H:%M:%S")
echo -e "${color_prefix}${timestamp} ${log_prefix}${1}${color_suffix}" >&${fd}
}
# Due to this unresolved issue: http://bit.ly/2xPmOY9 we choose preservation of
# message ordering at the expense of applying appropriate tags to stderr. As a