Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
3bfca874
Commit
3bfca874
authored
Mar 25, 2015
by
Quinton Hoole
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5960 from ixdy/kube-log-timestamps
Update kube::log::{error,status} to include timestamp.
parents
2a3199e3
46e8c08f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
35 deletions
+37
-35
common.sh
build/common.sh
+33
-33
logging.sh
hack/lib/logging.sh
+4
-2
No files found.
build/common.sh
View file @
3bfca874
This diff is collapsed.
Click to expand it.
hack/lib/logging.sh
View file @
3bfca874
...
@@ -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
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment