Replies: 3 comments
-
For posterity, here's the callstack-prefix-removal diff: Obviously I'm kind of hesitant to send a pull request that does nothing but remove functionality :V |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is going to be a kind of rambly discussion, because there's a few issues that interlock.
I've got a C# program that I want Info, Warning, and Error log channel outputs for. At the moment I'm using GD.Print(), GD.PushWarning(), and GD.PushError(). This has some problems.
First, because GD.Print() goes to the Output tab and GD.Push*() go to the Debugger tab, this means the output isn't interlaced. This makes it very hard to debug warnings and errors with info output; practically speaking, this means that when I'm debugging I don't have a Warning channel, because I just print everything through Warning.
Second, Output-tab items don't come with a callstack. Sometimes I really want to know where a log line came from; there's just no context provided.
Third, everything under the Errors tab has a prefix of the last entry in the callstack. This is reasonably OK for Godot-engine stuff, but it fails miserably with GD.Push*(). A screenshot:
The part I actually care about here is "Attempted construction with non-component type . . .", but that's hidden waaaay off on the right - the only way I can even see it is by mouseovering the log line (as I'm doing here), because if I click the dropdown, it doesn't wordwrap!
I've fixed this locally by just removing the callstack prefix:
but this obviously removes that prefix from other errors as well.
I'm not sure if there's anyone else with my requirements. But I do have to say that Unity did a pretty good job here; having all log entries in the same list, with click-for-callstack on all of them, and prioritizing the user output over boilerplate content, really does seem like the right way to go. I can work with my changes but other people might be having similar issues.
Alternatively, I'm pretty sure Unity's log system is not the paragon of perfection, and we could probably make something better. But IMO it should be at least as capable as Unity's :)
I'd be happy to work on implementing agreed-upon changes here, and if there's no agreement, I'll probably implement my own changes and then just sit on them. But I'd prefer if I could contribute something :)
Beta Was this translation helpful? Give feedback.
All reactions