mirror of
https://github.com/anomalyco/opentui.git
synced 2026-09-19 01:26:03 +08:00
a7fb4ec78e
## Summary - recognize the selected Ghostty `std.log` scopes in OpenTUI's root logger - keep all standard-library logs silent by default - read `OTUI_GHOSTTY_LOG_LEVEL` inside the native `logFn` and forward enabled messages through the existing `logger.logMessage` path - support `error`/`err`, `warn`/`warning`, `info`, and `debug` thresholds - document the environment variable ## Behavior Unset or invalid `OTUI_GHOSTTY_LOG_LEVEL` values emit no `std.log` messages. Recognized Ghostty scopes are forwarded up to the configured severity. Logs from every other scope are discarded. Explicit OpenTUI logger calls are unchanged. ## Testing - release `bun run build` from `packages/core` - `bun run test:native` from `packages/core` (2066 passed, 8 skipped) - `zig fmt --check packages/native/src/lib.zig packages/native/src/logger.zig` - `oxfmt --check packages/web/src/content/docs/reference/env-vars.mdx`