Debug.LogError with custom stacktrace?

Hello friends :slight_smile:

I’m implementing python into my game engine, and I’d like to hook the error output to the unity error console.
My current way of doing this is of course to simply run Debug.LogError().

However, the stack trace on the log is of course incorrect, since it’s showing the lines of C# code that runs the LogError function.

Is there a way to “hijack” the unity console, to basically instead put my own stacktrace? Or, am I able to hide the stacktrace, then I can just put it alongside the actual logerror string.

Thanks in advance :slight_smile:
Josh

Of course, once I post i find the answer.