summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahul Khiyani <rk0850@att.com>2019-01-15 21:56:12 -0500
committerRahul Khiyani <rk0850@att.com>2019-01-16 07:43:22 -0500
commit87dbc54044fd679f56123ffb1db9fefd35a77801 (patch)
treef555659af7a1b621080c93d1924101e238e77d46
parent11c6594b7f19f7e001b4879bc89b8f3a2069e012 (diff)
Adding timestamp to _shcommon as log formatter for
troubleshooting Change-Id: Ie89fc95e5d7f0e4f832bac45f87915893ed79942
Notes
Notes (review): Code-Review+2: Craig Anderson <craig.anderson@att.com> Code-Review+1: Rodolfo Pacheco <jezogwza@gmail.com> Code-Review+2: Matt McEuen <matt.mceuen@att.com> Workflow+1: Matt McEuen <matt.mceuen@att.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 17 Jan 2019 21:29:24 +0000 Reviewed-on: https://review.openstack.org/631298 Project: openstack/airship-divingbell Branch: refs/heads/master
-rw-r--r--divingbell/templates/bin/_shcommon.tpl3
1 files changed, 2 insertions, 1 deletions
diff --git a/divingbell/templates/bin/_shcommon.tpl b/divingbell/templates/bin/_shcommon.tpl
index 36a1380..16d59df 100644
--- a/divingbell/templates/bin/_shcommon.tpl
+++ b/divingbell/templates/bin/_shcommon.tpl
@@ -59,7 +59,8 @@ __text_formatter(){
59 if [ -n "${color_prefix}" ]; then 59 if [ -n "${color_prefix}" ]; then
60 color_suffix='\e[0m' 60 color_suffix='\e[0m'
61 fi 61 fi
62 echo -e "${color_prefix}${log_prefix}${1}${color_suffix}" >&${fd} 62 timestamp=$(date "+%m-%d-%y %H:%M:%S")
63 echo -e "${color_prefix}${timestamp} ${log_prefix}${1}${color_suffix}" >&${fd}
63} 64}
64# Due to this unresolved issue: http://bit.ly/2xPmOY9 we choose preservation of 65# Due to this unresolved issue: http://bit.ly/2xPmOY9 we choose preservation of
65# message ordering at the expense of applying appropriate tags to stderr. As a 66# message ordering at the expense of applying appropriate tags to stderr. As a