Kernel logging currently invokes application handlers while holding the logger mutex and, in some cases, validation locks. Slow handlers delay the caller, and handlers that call back into the kernel or acquire conflicting locks can deadlock.
This PR replaces those callbacks with the file writer already used by the node. Applications provide a file path through the C API or C++ wrapper, and the existing logger appends messages to that file. A single logging connection owns the file and closes it when destroyed.
This keeps application log handling out of kernel execution while reusing Core’s existing file writer and bounded startup buffer. It also avoids adding a separate delivery queue with its own capacity, overflow, and consumer lifecycle concerns. Applications can read the file independently and forward messages elsewhere.
File output keeps the node’s existing logging behavior: synchronous, best-effort writes with bounded startup buffering.