mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-14 03:25:50 +00:00
core: guard app message logging to ensure it's optimized away in release builds
This commit is contained in:
10
src/App.zig
10
src/App.zig
@@ -237,10 +237,12 @@ pub fn needsConfirmQuit(self: *const App) bool {
|
||||
/// Drain the mailbox.
|
||||
fn drainMailbox(self: *App, rt_app: *apprt.App) !void {
|
||||
while (self.mailbox.pop()) |message| {
|
||||
switch (message) {
|
||||
// these tend to be way too verbose for normal debugging
|
||||
.redraw_surface, .redraw_inspector => {},
|
||||
else => log.debug("mailbox message={t}", .{message}),
|
||||
if (std.log.logEnabled(.debug, .app)) {
|
||||
switch (message) {
|
||||
// these tend to be way too verbose for normal debugging
|
||||
.redraw_surface, .redraw_inspector => {},
|
||||
else => log.debug("mailbox message={t}", .{message}),
|
||||
}
|
||||
}
|
||||
switch (message) {
|
||||
.open_config => try self.performAction(rt_app, .open_config),
|
||||
|
||||
Reference in New Issue
Block a user