-
Notifications
You must be signed in to change notification settings - Fork 699
Don't log DNS queries by default #1368
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Isn't this a bug?
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.
Idk, I thought it was intentionally set to always log at DEBUG because the output goes to
ha.stderr.log
and doesn't pollute the terminal output: e88241e.Which made sense to me: I don't normally want the output of
limactl --debug start
in the terminal, but I only look atha.stderr.log
when something is wrong, so always getting DEBUG output there is useful, so you don't have to restart your VM with--debug
to get full logs.So assuming this was intentional, I extended it to include TRACE level output when you run with
--debug
, as there is no way to specify the logging level for HA separately from the main logging level.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.
IIRC that was just my silly workaround to avoid bother implementing
--log-level
propagation 🤦Uh oh!
There was an error while loading. Please reload this page.
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.
Log-level propagation is implemented (and I tested that it works when you remove the explicit override to DEBUG in the HA code):
lima/pkg/start/start.go
Lines 127 to 129 in 5b9df0e
I continue to think that always having debug logging active in
ha.stderr.log
is useful, even though it feels inconsistent. I just don't want to include DNS lookups in it by default.So on a practical level this PR works for me. If we want to regularize the settings, I think we need a separate log-level for HA that should default to DEBUG. But this is just adding complexity for little benefit.
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.
I just checked, and the propagation was already implemented by the time the override was added. So it still feels intentional to me. 😄
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.
Propagation of custom log level is not implemented
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.
I don't know what you mean by that. We only have INFO and DEBUG log levels in
limactl
, and that level is propagated to the HA, but then overridden to always be DEBUG.Anyways, I'm lost now at what you want to do.
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.
Sorry, you are right, I've forgotten my own coding design 😞