-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Make -q
to silence header, and stdout
if specified twice
#63575
Conversation
|
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'm not fond of changing the meaning of -q
and requiring specifying it twice to get back the proper quiet
mode. I know some CLI works like this but that's bad design IMO (and usually it's for stuff like -v
/-vv
where it increases the verbosity, but here the -q
behavior as of this PR does not make the output "quiet".
Instead I would add a --no-header
parameter to silence the header independently from the rest.
@akien-mga
But there are also these that are output in default mode.
Should they also depend on Can you tell what else would |
I think so, yes.
Internal errors and warnings will still be printed by the engine with |
I hope they are printed to |
They should be if I'm not mistaken 🙂 |
For these two lines I still need a pointer to filter them out. |
They should be filtered out with |
Seems doable. I still haven't found the class that outputs this info though. |
The lines printing the headers are:
|
print_line( | |
"Vulkan API " + itos(vulkan_major) + "." + itos(vulkan_minor) + "." + itos(vulkan_patch) + | |
" - " + "Using Vulkan Device #" + itos(device_index) + ": " + device_vendor + " - " + device_name); |
godot/drivers/gles3/rasterizer_gles3.cpp
Line 196 in e27b61d
print_line("OpenGL Renderer: " + RS::get_singleton()->get_video_adapter_name()); |
3.x
branch (not for this pull request, but if you intend to redo this for 3.x
)
- OpenGL ES 3.0 renderer:
godot/drivers/gles3/rasterizer_gles3.cpp
Line 188 in 373a67b
print_line("OpenGL ES 3.0 Renderer: " + VisualServer::get_singleton()->get_video_adapter_name()); - OpenGL ES 2.0 renderer:
godot/drivers/gles2/rasterizer_gles2.cpp
Line 264 in 373a67b
print_line("OpenGL ES 2.0 Renderer: " + VisualServer::get_singleton()->get_video_adapter_name());
But then you'll have to change the way "disable stdout" works or add a new parameter? |
Yes, a separate project setting should be added to toggle the header display (if you can get it to work, as the PCK that defines the project setting's value may be loaded after some of the headers are printed). |
I reworked this in #79179 to add |
Good work ! |
@abitrolly I opened a pull request based on tient to add --no-header to the project settings |
@kaissouDev nice! What is your story for exporting the game without console output? Are you making a roguelike for terminal in Godot? My use case for terminal is just have a script with a |
Hello ! I just wanted to add the "--no-header" option to have more control over the console of our game without having 2 lines written automatically. |
Maybe an option to customize that header would be a better fit for project options? The it can
But I think that discussion belongs to a new issue at https://github.com/godotengine/godot-proposals |
Yes, that would be a good idea, I think it can be done if you store a variable and print it in the console, but then I don't really see the point because you can use gdscript for everything. |
Yea, well, I guess I am just overthinking it. That header reminded me how Unity logo flashes on Kongregate games. Guess that's a feature of free Unity version. So I thought that if Godot has logo stripped, then how people would know that a game is made with Godot? Then I thought that maybe people who want to strip it are not limited in any way, and that's a good thing for them. But then there are people who want to help Godot and wouldn't mind advertising that they not only use Godot, but also support it. EDIT: I needed to expand on the idea on how the header could be helpful for Godot. |
I think that if you want to print a custom header, you should do it yourself in GDScript in an autoload's |
but isn't print_rich for making texts in different colours? |
Yes, and some people may want to use that in a header 🙂 In general, I'd avoid scope creep and just add an option to disable the built-in header. See Best practices for engine contributors. |
Superseded by #79179. |
I am not sure it works, because
quiet_header
is defined inMain::setup
and probably is not available inMain::setup2
.I'd like to silence the header, because I use some
.gd
scripts from command line, and need to pipe their output without extra lines fromgodot
.Bugsquad edit: This closes godotengine/godot-proposals#4998.