-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add newlines to SkaffoldLogEvent
s that come from logrus
#6506
Add newlines to SkaffoldLogEvent
s that come from logrus
#6506
Conversation
@@ -138,7 +138,7 @@ func (c *cache) Build(ctx context.Context, out io.Writer, tags tag.ImageTags, ar | |||
}) | |||
} | |||
|
|||
log.Entry(ctx).Info("Cache check completed in", util.ShowHumanizeTime(time.Since(start))) | |||
log.Entry(ctx).Infoln("Cache check completed in", util.ShowHumanizeTime(time.Since(start))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Are there any integration/unit tests that verify the form of a log entries? Might be helpful if Cloud Code relies on them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We currently don't really have any testing for most things output related I believe. This would be good to have in the future and I think that having the API Server now will help a lot with that since we can connect to the server and check output through there rather than parsing output from the terminal. I'd like to add this is a follow up
Codecov Report
@@ Coverage Diff @@
## main #6506 +/- ##
==========================================
- Coverage 70.42% 70.41% -0.02%
==========================================
Files 515 515
Lines 23121 23121
==========================================
- Hits 16284 16281 -3
- Misses 5781 5782 +1
- Partials 1056 1058 +2
Continue to review full report at Codecov.
|
Related: #6492
Description
This PR adds line breaks to the end of messages that come from logrus and get sent out through
SkaffoldLogEvent
s.Before, we sent
entry.Message
, but now we will sendfmt.Sprintf("%s\n", entry.Message)
Also fixes a few log lines that should be the
ln
form of their function call.Follow-up Work (remove if N/A)
Another PR will be opened to add a default log level for basic output that comes from skaffold. That PR will close #6492