aboutsummaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-04-05 03:54:46 +0300
committerCan Celik <ogulcancelik@gmail.com>2026-04-05 03:54:46 +0300
commit26ec677193ef7e207feaec19c3ed1504d6f23029 (patch)
treeea8f25829925f7481bd64fb30a32534220a5a54d /vendor
parent8525503dba9029d0a5f24990e026d8164f0bf39c (diff)
fix: silence embedded libghostty-vt logs
Diffstat (limited to 'vendor')
-rw-r--r--vendor/libghostty-vt/src/lib_vt.zig23
1 files changed, 19 insertions, 4 deletions
diff --git a/vendor/libghostty-vt/src/lib_vt.zig b/vendor/libghostty-vt/src/lib_vt.zig
index adfb1147..9f5ee6c4 100644
--- a/vendor/libghostty-vt/src/lib_vt.zig
+++ b/vendor/libghostty-vt/src/lib_vt.zig
@@ -242,6 +242,18 @@ comptime {
}
}
+fn silentLog(
+ comptime level: std.log.Level,
+ comptime scope: @Type(.enum_literal),
+ comptime format: []const u8,
+ args: anytype,
+) void {
+ _ = level;
+ _ = scope;
+ _ = format;
+ _ = args;
+}
+
pub const std_options: std.Options = options: {
if (builtin.target.cpu.arch.isWasm()) break :options .{
// Wasm builds we specifically want to optimize for space with small
@@ -256,10 +268,13 @@ pub const std_options: std.Options = options: {
.logFn = @import("os/wasm/log.zig").log,
};
- // For everything else we currently use defaults. Longer term I'm
- // SURE this isn't right (e.g. we definitely want to customize the log
- // function for the C lib at least).
- break :options .{};
+ // Embedded libghostty-vt runs inside herdr's TUI process. Writing logs to
+ // stdout/stderr corrupts the ratatui surface, so silence library-side Zig
+ // logging by default for the C library build.
+ break :options .{
+ .log_level = .err,
+ .logFn = silentLog,
+ };
};
test {