-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add --no-header
command line argument to silence the lines printed by Godot on startup
#4998
Comments
Wouldn't this technically count as a breaking change? Maybe not since I doubt anyone relies on it but this proposal's solution makes little sense to me, I agree in removing that with a commandline argument, but why is the solution double |
godotengine/godot#55696 already changed Using verbosity options multiple times is used quite often for command line tools that have several levels of output. The example from
This one from
There are probably others as well. It is possible to add |
Yeah, I was more so just pointing out its just changing the semantics of
But this has nothing to do with logging or verbosity because all it does is prevent the printing of the header to stdout, it doesn't affect anything regarding the logging levels. In that case my point stands.
To be fair I kind of hate python so this is likely why I never thought about it, but again verbosity is not the same thing here, the header doesn't apply to the logging, and this doesn't actually change that, in fact in the case you wanted to mimic that behavior this would violate that and then it would require breaking this functionality again. Better not to make that mistake inherently.
Well yeah, this isn't supposed to be a solution to verbosity or logging, least your issue doesn't support that and neither does the associated PR, the point is to get rid of the header, why confuse that with logging or verbosity levels then? Its not like we're gonna specifically have a NO_HEADER verbosity/logging level for this, or at least I doubt that anyone would be okay with that. |
-q
and stdout with -q
-q
godot
output, but not script output with -q
or -qq
godot
output, but not script output with -q
or -qq
godot
output, but not script output with -q
The point is to get rid of |
Well given that script output is a godot message, that doesn't technically make sense, I get what you're saying, but if error messages and warning messages are still gonna fire, literally all you're seeking is to remove the header in which case why describe it like that? This still doesn't change the verbosity. (which might be a useful feature but that isn't addressed here) Like if you're already running godot in no window mode and script mode, the only thing you'll be printing to the screen outside of whats in your script is the header, which is not associated with verbosity or logging anyway. (and I don't see where your use case presented falls outside of that bound) I just don't get why not target this specifically at the header, it kinda sounds like expanding of the scope of the problem beyond its bounds, not targeting the specific problem you're having, like maybe the maintainers disagree, I feel like you should keep this change local to what you specifically want without changing more then necessary. (nor changing the semantics of an existing functionality, least without what I feel is proper cause to do so, but again that's just me) |
Error messages are sent to
I don't know yet where this one is coming from even if it looks like a header.
I'll be fine with |
That's not guaranteed, most especially since you can disable printing to stderr at runtime, and it's neither guaranteed to be exclusive to stderr in Godot, and that's not much of a problem in other development applications because they support logging level command line arguments alongside that. But I just don't see how the goal of this is specifically to solve anything in regards to |
I have a question, how to export a Godot game with --quiet flags ? |
Enable the Application > Run > Disable Stdout project setting, then export the project. Use the |
OK, but if I do that, it will also delete the "print" in our gdscript code? |
Yes, as evidenced by the above replies in the proposal. To remove only the header, you need to modify Godot's source code and recompile export templates for all platforms you wish to export to. |
but in : |
The Disable Stdout project setting I mentioned does apply to the exported project. Main Run Args is intended to only affect the editor – it's not technically possible for it to affect an exported project. |
Ok, but here I was talking about other arguments and not necessarily --quiet, in any case thank you for the info. |
godot
output, but not script output with -q
--no-header
command line argument to silence the lines printed by Godot on startup
Describe the project you are working on
Command line script that uses Godot for visualization and stdout for piping results.
Describe the problem or limitation you are having in your project
stdout
from script is always prepended with Godot version and debug info.Using
--quiet
removes allstdout
messages, including those from script,and I'd to still read script messages.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Allow to specify
--quiet
(or-q
in 4.0) multiple times.-q
- silencesgodot
messages, but leaves script output-q -q
- silences allstdout
outputDescribe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Pseudo-code.
https://github.com/godotengine/godot/pull/63575/files
If this enhancement will not be used often, can it be worked around with a few lines of script?
Not from within Godot.
Is there a reason why this should be core and not an add-on in the asset library?
Addons don't have control over internal Godot messages.
The text was updated successfully, but these errors were encountered: