Skip to content
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

Removes inline os.Stdout as log output #5550

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mathetake
Copy link
Member

@mathetake mathetake commented Mar 20, 2025

What type of PR is this?

refactor: removes inline os.Stdout as log output

What this PR does / why we need it:

This removes the (almost) remaining places where the logger is configured to use os.Stdout instead of the configured output inherited from the cobra command. Without this change, the logging destination is scattered randomly from the downstream user's perspective. This is a follow up on #5476 #5483 and eliminates almost all places using os.Stdout except for the global loggers in a few places plus the stdout for the standalone mode's Envoy process. The implementation should be agnostic to any io.Writer in reality and there shouldn't be any necessity to directly use os.Stdout for all cases.

@mathetake mathetake marked this pull request as ready for review March 20, 2025 04:19
@mathetake mathetake requested a review from a team as a code owner March 20, 2025 04:19
@Xunzhuo
Copy link
Member

Xunzhuo commented Mar 20, 2025

Plz fix the CI failures @mathetake

@mathetake
Copy link
Member Author

yeah sorry done

Copy link

codecov bot commented Mar 20, 2025

Codecov Report

Attention: Patch coverage is 52.63158% with 9 lines in your changes missing coverage. Please review.

Project coverage is 65.36%. Comparing base (580686a) to head (fe89f67).

Files with missing lines Patch % Lines
internal/cmd/egctl/status.go 0.00% 6 Missing ⚠️
internal/cmd/certgen.go 0.00% 3 Missing ⚠️

❌ Your patch check has failed because the patch coverage (52.63%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5550      +/-   ##
==========================================
+ Coverage   65.25%   65.36%   +0.10%     
==========================================
  Files         213      213              
  Lines       34063    34067       +4     
==========================================
+ Hits        22228    22268      +40     
+ Misses      10500    10473      -27     
+ Partials     1335     1326       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mathetake
Copy link
Member Author

/retest

@mathetake
Copy link
Member Author

great

Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks !

@arkodg arkodg requested review from a team March 20, 2025 22:04
Signed-off-by: Takeshi Yoneda <[email protected]>
Signed-off-by: Takeshi Yoneda <[email protected]>
@zirain zirain force-pushed the loggeroutputcentralize branch from dc5ff70 to fe89f67 Compare March 22, 2025 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants