See also https://github.com/godotengine/godot-proposals/issues/919.
Describe the project you are working on:
The Godot editor :slightly_smiling_face:
Describe the problem or limitation you are having in your project:
We currently have ERR_PRINT() and WARN_PRINT() macros to print error and warning messages respectively. (These are available as push_error() and push_warning() in GDScript.)
However, we don't have an equivalent for informational prints that are not errors or warnings. We can use print(), but this is typically used for debugging instead.
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Add an info logging category for messages that are more important than others, but aren't considered errors or warnings.
This will also be helpful once we implement filtering messages by category in the editor's Output panel.
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
Add a INFO_PRINT() macro in C++ and expose a push_info() global scope method in GDScript (and by extension, C#).
Unlike the warning and error print handlers, the info print handler should not print a stack trace to the terminal since the user doesn't need to know the message's origin. The message should also not appear in the editor's Errors panel.
In the terminal, we can use the \e[1m (bold) ANSI escape code for coloring the message. This makes it easier to dinstinguish from standard print()s.

If this enhancement will not be used often, can it be worked around with a few lines of script?:
It can be implemented by a script, but it's not ideal as we'd prefer to have a standard way of reporting informational messages.
Is there a reason why this should be core and not an add-on in the asset library?:
See above.
Yeah, see example use case where existing warning messages could be converted to informational messages as seen in godotengine/godot#39396. Having ability to control the severity/verbosity of those type of messages would also be nice to have. The existence of dedicated informational prints may also remove the need for using print_line() in some cases, but might be a bit far fetched.
Holy crap, i didnt know push_error and push_warn existed!
I created a quick version of this in a singleton because I wanted to be able to disable all of the printed 'notes' and warnings with just a boolean toggle when I was done testing something and wanted to see my other print statements without the console being so cluttered.
(And also so I could tell which print statements I meant to keep "permanently" vs only temporarily)
Would be nice to have a toggle in the Project Settings for globally disabling either push_warning() and push_info() instead of having to remove/comment out those calls one at a time.
(We may only want to disable them for a short time, not completely remove them or have to un-comment them again)
Here's what I did:
var is_alerting_notes := true
var is_alerting_warnings := true
const Note := {
Rejected_Simulated_BTN_Event = "Rejected_Simulated_BTN_Event",
Rejected_Non_Simulated_BTN_Event = "Rejected_Non_Simulated_BTN_Event",
}
const Warning := {
Menu_Row_Empty = "Menu_Row_Empty",
}
const Error := {
Menu_Pos_Already_Taken = "Menu_Pos_Already_Taken",
No_Assigned_Menu_Controlling_Scene = "No_Assigned_Menu_Controlling_Scene",
}
func send_note(__note: String, __details: String = ""):
assert(Note.values().has(__note))
if is_alerting_notes:
if !__details.empty():
print_debug("\n", __note, "\n", __details)
else:
print_debug("\n", __note)
func send_warning(__warning: String, __details: String = ""):
assert(Warning.values().has(__warning))
if is_alerting_warnings:
if !__details.empty():
push_warning(str(__warning, " - ", __details))
else:
push_warning(__warning)
func send_error(__error: String, __details: String = ""):
assert(Error.values().has(__error))
push_error("Critical error. See print statement.")
if !__details.empty():
print("\n", __error, "\n", __details)
else:
print("\n", __error)
assert(false)
@Error7Studios This pull request will address the need for filtering: https://github.com/godotengine/godot/pull/41321
I started working on this, but I can't get it to display in the editor Output log when push_info() isn't called from a tool script: https://github.com/Calinou/godot/tree/add-push-info
Most helpful comment
Holy crap, i didnt know push_error and push_warn existed!