Skip to content
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

Logging(print, push_warning, etc.) should also tell what script or what object it came from and when #3323

Closed
atirut-w opened this issue Sep 20, 2021 · 1 comment

Comments

@atirut-w
Copy link

Describe the project you are working on

(None)

Describe the problem or limitation you are having in your project

(None)

Describe the feature / enhancement and how it helps to overcome the problem or limitation

One feature that I kind of miss after moving from Unity to Godot is that when logging things, Unity takes note of which script(and which object IIRC) the log came from and when. I can see this being pretty useful for debugging.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

This would probably require changing a lot about how the output logging in Godot works. For example, print, push_warning, and push_error, instead of just putting things into the output, will create a sort of log object that contains message, time, etc. and send it to something that manages output.

If this enhancement will not be used often, can it be worked around with a few lines of script?

How do you even change how the print function globally works from a script?

Is there a reason why this should be core and not an add-on in the asset library?

See above.

@Calinou
Copy link
Member

Calinou commented Sep 20, 2021

Try using print_debug() or print_stack(), it should give you a stack trace.

Either way, this is a duplicate of #963.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants