-
Notifications
You must be signed in to change notification settings - Fork 920
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
INFO
-level logging is too verbose
#3206
Comments
I approve of this proposed change. It was an unpleasant surprise that my application logs were flooded with per-frame events when I added I would like to suggest the rule that INFO or higher level should only be used if:
That will minimize the probability of every-frame log spam which could create problems like a game writing gigabytes of log file to disk while it sits idle. (Of course, capping log file size is a good idea anyway, but it's the sort of thing that can be easily overlooked, and it reduces the value of the log when actually looked at.) |
Thanks for creating this issue and summarizing it so well! Repro
This already prints:
This is far more verbose than any other Rust crate I know of. If I then resize the window, then each frame during the resize I get:
The same is true in the browser. Now, I'm no wgpu expert, and it is possible that the egui-wgpu renderer could/should be rewritten to do less wgpu allocations (@Wumpf knows it better than I do), but recreating the render surface on resize is unavoidable, and since it is something I as the user am doing explicitly, I don't need |
My two cents on log levelsThe log is for several distinct users:
We are all sharing the same log stream, so we must cooperate carefully. This is my general philosophy:
|
I'm noting where we seem to diverge or converge for each log level in the PR OP. I'm assuming that general consensus is what we're looking for, as opposed to consensus only among maintainers (CC @cwfitzgerald, @jimblandy, @i509VCB, @crowlKats, @teoxoy). LMK if any assumptions are invalid, this just doesn't sound useful, or I've missed somebody in my tagging. EDIT: Also inviting more informal chat in Matrix here. In general, I agree with the thrust of @cwfitzgerald's and @emilk's opinions, and I think we all have mostly compatible opinions? I am hesitant to un-bold things (meaning, mark them as not controversial), without explicit confirmation, but even then, I think we can refine this quickly into consensus. |
I'd also add to the scope of To that point: @kpreid suggested that a “message [that] is almost certainly indicating a bug worth noting” should be in |
Description
While @emilk was investigating a (separate) crashing issue with
wgpu
, they reported thatwgpu-hal
andwgpu-core
's logging at theINFO
level were so verbose as to hinder debugging.Repro steps
See this comment.
Expected vs observed behavior
In @emilk's words:
Out of the box, we'd like
INFO
-level and higher severities of logging to have a high ratio of useful information.Extra materials
-
Platform
-
Remaining action items
@cwfitzgerald's opinion(s): 1 (consensus from @kvark)
@kpreid's opinion(s): 1
@emilk's opinion(s): 1
@ErichDonGubler's opinion(s): 1
Current apparent consensus, with open questions noted in bold:
wgpu
, but should still be resolved. An “unrecoverable” issue requires end-user or developer intervention to resolve.wgpu
's usage. Low severity ("less severe") may result in degraded performance or scope of functionality, but is not likely to threaten overall usage.ERROR
Err
ors to user code.WARN
INFO
wgpu
operations. Currently unclear whether there are any non-problematic per-frame events that are acceptable to report here.DEBUG
wgpu
's inner workings. Intended only to contextualize other logs or span elements.TRACE
wgpu
itself is being scrutinized heavily for bugs.DEBUG
level.DEBUG
or lower, in general.The text was updated successfully, but these errors were encountered: