8000 Cleanup logging by SuperQ · Pull Request #216 · jetkvm/kvm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Cleanup logging #216

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

Merged
merged 1 commit into from
Mar 11, 2025
Merged

Cleanup logging #216

merged 1 commit into from
Mar 11, 2025

Conversation

SuperQ
Copy link
Contributor
@SuperQ SuperQ commented Mar 1, 2025

Make sure all logging output is called via the main logger instead of stdlib "log" or fmt.Print(f|ln).

@SuperQ
Copy link
Contributor Author
SuperQ commented Mar 1, 2025

It would be nice to get #7 merged. Then we can enforce this via linter settings.

@SuperQ
Copy link
Contributor Author
SuperQ commented Mar 1, 2025

Somewhat related to #215.

@SuperQ SuperQ force-pushed the superq/cleanup_fmt_print branch from 4abb7f8 to 30a4e5d Compare March 4, 2025 06:55
Make sure all logging output is called via the main logger instead of
stdlib `"log"` or `fmt.Print(f|ln)`.

Signed-off-by: SuperQ <superq@gmail.com>
@SuperQ SuperQ force-pushed the superq/cleanup_fmt_print branch from 30a4e5d to 34e33e4 Compare March 11, 2025 15:54
@Nevexo Nevexo requested review from adamshiervani and ym and removed request for adamshiervani March 11, 2025 15:56
@Nevexo
Copy link
Contributor
Nevexo commented Mar 11, 2025

As this touches quite a few files and will become rebasing-hell quite quickly, a review of this would be great once you folks get time.

Copy link
Contributor
@Nevexo Nevexo left a comment

Choose a reason for hiding this comment

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

We should probably standardise the way messages are written, like my PRs introduced display: method: , some use [feature.method] and the rest just have no format.

But that's out of scope for this PR imo.

@SuperQ
Copy link
Contributor Author
SuperQ commented Mar 11, 2025

We should probably standardise the way messages are written

My idea is to switch logging to log/slog and use structured tagging instead of strings.

Within each feature you can do featureLogger := logger.With("subsystem", "feature")

@SuperQ
Copy link
Contributor Author
SuperQ commented Mar 11, 2025

Maybe ping @ym @chemhack?

@ym ym merged commit 4884240 into jetkvm:dev Mar 11, 2025
1 check passed
@SuperQ SuperQ deleted the superq/cleanup_fmt_print branch March 11, 2025 17:19
@SuperQ SuperQ mentioned this pull request Mar 12, 2025
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.

3 participants
0