Commit 3bfca874 authored by Quinton Hoole's avatar Quinton Hoole

Merge pull request #5960 from ixdy/kube-log-timestamps

Update kube::log::{error,status} to include timestamp.
parents 2a3199e3 46e8c08f
...@@ -85,7 +85,8 @@ kube::log::error_exit() { ...@@ -85,7 +85,8 @@ kube::log::error_exit() {
# Log an error but keep going. Don't dump the stack or exit. # Log an error but keep going. Don't dump the stack or exit.
kube::log::error() { kube::log::error() {
echo "!!! ${1-}" >&2 timestamp=$(date +"[%m%d %H:%M:%S]")
echo "!!! $timestamp ${1-}" >&2
shift shift
for message; do for message; do
echo " $message" >&2 echo " $message" >&2
...@@ -129,7 +130,8 @@ kube::log::info_from_stdin() { ...@@ -129,7 +130,8 @@ kube::log::info_from_stdin() {
# Print a status line. Formatted to show up in a stream of output. # Print a status line. Formatted to show up in a stream of output.
kube::log::status() { kube::log::status() {
echo "+++ $1" timestamp=$(date +"[%m%d %H:%M:%S]")
echo "+++ $timestamp $1"
shift shift
for message; do for message; do
echo " $message" echo " $message"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment