Update kube::log::{error,status} to include timestamp.

Additionally, make the build scripts call these rather than calling
'echo' directly.
This commit is contained in:
Jeff Grafton
2015-03-25 15:57:14 -07:00
parent af32a0aa8e
commit 46e8c08fe8
2 changed files with 37 additions and 35 deletions

View File

@@ -85,7 +85,8 @@ kube::log::error_exit() {
# Log an error but keep going. Don't dump the stack or exit.
kube::log::error() {
echo "!!! ${1-}" >&2
timestamp=$(date +"[%m%d %H:%M:%S]")
echo "!!! $timestamp ${1-}" >&2
shift
for message; do
echo " $message" >&2
@@ -129,7 +130,8 @@ kube::log::info_from_stdin() {
# Print a status line. Formatted to show up in a stream of output.
kube::log::status() {
echo "+++ $1"
timestamp=$(date +"[%m%d %H:%M:%S]")
echo "+++ $timestamp $1"
shift
for message; do
echo " $message"