-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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 built-in logging classes / capabilities #27958
Comments
You can use the global scope methods Formatting can be achieved using the |
Related #22202 |
@Calinou still, we lack more detailed levels like INFO, DEBUG and TRACE. What if I want to log some tracking stuff so that I can use that info later when investigating bugs? I don't think that's a good idea to log everything with P. S. Thanks for those methods, I didn't know that=) EDIT: |
+1. I'm using a fork of this: https://github.com/hedin-hiervard/godot-logger I quite like Qt's way of doing it: https://doc.qt.io/qt-5/qloggingcategory.html There you can also use a conf file (INI) to enable/disable warnings. |
@mitchcurtis thanks a lot, I'll take a look at that |
+1. We also currently use the above mentioned godot-logger but it is quite limited currently. Also I think this is an important basic functionality which should be provided out of the box. An integrated logging mechanism also would make it possible to dynamically change the loglevel or logging scope in the editor during runtime and thus provide an additional benefit... |
As this is a proposal and the related PR was closed - could this issue be moved to godotengine/godot-proposals in some way? |
@pwab feel free to copy-paste it there, I don't mind :) |
Since this was moved to proposals, it can be closed. |
Godot version: 3.1
Issue description:
I do use logging a lot to track things in the game and investigate bugs. But I don't believe that I do that in an efficient way (or that there's such way at all for GDScript). I believe this is a very basic feature, but I've failed to find something related to that.
What I expect from logger
This is a class that allows and supports:
printf
special characters, for example:%t
would mean current time like2012-01-30T10:20:30Z
or whatever%n
would mean name of the logger%t
would mean name of thread this logger is triggered fromCurrently, I'm doing this with my own
Logger
class written in GDScript and handling all that levels. But even so, when I need to dig into an issue and set logging level to TRACE (i.e. I see LOTS of logs with every little detail happening in my game) I get irritating message:But, hell, I do need to print lots of text!
The text was updated successfully, but these errors were encountered: