3 ms·
There are plans in Zig to allow to include custom information into error stack trace https://github.com/ziglang/zig/issues/14446 https://github.com/ziglang/zig/
by fpoling 11mo ago
There are plans in Zig to allow to include custom information into error stack trace https://github.com/ziglang/zig/issues/14446 https://github.com/ziglang/zig/issues/14446.
But that is not implemented.
In any case, when debugging annotating error with extra context often is not enough. One often needs a detailed trace of what happens before.
So what I would like to see in any programming language is ability to do a structured logging with extra context from the call stack (including asynchronous support in languages that have that) that has almost zero overhead when the log is not printed.
Various languages and runtimes have some libraries that try to do that, but the usage is awkward and the performance overhead is not trivial.
- ulbu 11mo agoclosed as not planned :)
- ayende 11mo agoNot this is explicitly marked as Not Planned
- jandrewrogers 11mo agoI made a go of this using the stacktrace functionality built into C++23. The overhead and complexity it introduced made it not worth it, unfortunately. There may be a way to do this but it seems non-trivial in implementation.