Tweak debug logging

1 - Add a log_level build option to control the default log level from
    the build (e.g. -Dlog_level=debug). Defaults to info

2 - Add a new boolean log_unknown_properties build option to enable
    logging unknown properties. Defautls to false.

3 - Remove the log debug for script eval - this can be a huge value
    (i.e. hundreds of KB), which makes the debug log unusable IMO.
This commit is contained in:
Karl Seguin
2025-05-20 11:22:56 +08:00
parent f95defe82f
commit 769d99e7bd
5 changed files with 47 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
const std = @import("std");
const builtin = @import("builtin");
const build_info = @import("build_info");
const build_config = @import("build_config");
const Thread = std.Thread;
const Allocator = std.mem.Allocator;
@@ -151,7 +151,7 @@ const LightPandaEvent = struct {
try writer.write(builtin.cpu.arch);
try writer.objectField("version");
try writer.write(build_info.git_commit);
try writer.write(build_config.git_commit);
try writer.objectField("event");
try writer.write(@tagName(std.meta.activeTag(self.event)));