-
Notifications
You must be signed in to change notification settings - Fork 128
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
fix(stderr): ensure we output error to stderr, not stdout #1074
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1074 +/- ##
==========================================
- Coverage 32.87% 32.87% -0.01%
==========================================
Files 103 103
Lines 12847 12850 +3
==========================================
Hits 4224 4224
- Misses 8214 8217 +3
Partials 409 409
☔ View full report in Codecov by Sentry. |
Yes, this is used by KIC @Kong/team-k8s |
I think this would be a breaking change for people that expect warnings on I'd expect the following behaviour:
|
I don't think we care much on the KIC side. We disable deck logs above debug and cannot parse them. I don't think the changes other than those in The multi-line diff output KIC gets isn't really suitable for log daemon consumption either way, so I'd be fine changing them immediately. It's breaking in the strictest sense, but not really given the practical use case (a human looks at container logs directly for debugging) those messages fit at present. One of the limitations of our current deck interface for KIC is that deck doesn't let you inject a logger, as much of deck doesn't actually use a log library--the cprint stuff is just a basic wrapper around The lines KIC ends up showing are logged within the Syncer rather than returned from it, which is one of the things we'd want to change if moving to a more library-oriented design. For now we only have the global cprint on/off toggle. |
closing this since it is considered breaking |
This updates the
cprint
package to explicitly specify the output stream.All occurrences have been updated accordingly, explicit warnings are now going to
stderr
. A few statements remain to stdout.Is this breaking?
cprint
, is this part of the external API?Syncer
(see changes indiff/diff.go
) remains backward compatible, since that is part of the external API.