this implements a modified version of the logging interface proposed here: https://github.com/ziglang/zig/pull/5348