This commit is contained in:
2026-08-04 13:00:56 +02:00
parent d9af82d230
commit a1a56cd08c
4 changed files with 97 additions and 34 deletions
+15
View File
@@ -69,3 +69,18 @@ A normal shutdown sends `CMD_QUIT`, waits for its result, closes the child's
stdin, and waits for the child process. If the Racket process terminates
unexpectedly, the operating system closes the pipe; EOF on stdin makes the Qt
backend close all windows and quit.
## Structured stderr logging
The backend writes diagnostic logging to stderr, never to stdout. Log entries
created through `utils.h` are emitted as one line beginning with `json:` followed
by a compact JSON object:
```text
json:{"topic":"webview-backend","level":"debug","elapsed":1.234,"message":"..."}
```
Newlines and other control characters in the message are JSON escaped, so one
C++ log call always produces one physical stderr line. Consumers should also
accept unstructured stderr lines because Qt, Qt WebEngine, or another library
may write diagnostics directly.