From 6a0b154d67705316508b7b6190134eeff8d3e9fe Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Fri, 14 Mar 2025 11:38:47 +0100 Subject: [PATCH] cdp: dump runtime js only in debug mode --- src/cdp/runtime.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cdp/runtime.zig b/src/cdp/runtime.zig index 3150e441..110b161c 100644 --- a/src/cdp/runtime.zig +++ b/src/cdp/runtime.zig @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +const builtin = @import("builtin"); const std = @import("std"); const cdp = @import("cdp.zig"); @@ -37,7 +38,7 @@ pub fn processMessage(cmd: anytype) !void { fn sendInspector(cmd: anytype, action: anytype) !void { // save script in file at debug mode - if (std.log.defaultLogEnabled(.debug)) { + if (builtin.mode == .Debug) { try logInspector(cmd, action); }