mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 14:43:28 +00:00
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:
14
build.zig
14
build.zig
@@ -44,6 +44,18 @@ pub fn build(b: *std.Build) !void {
|
||||
b.option([]const u8, "git_commit", "Current git commit") orelse "dev",
|
||||
);
|
||||
|
||||
opts.addOption(
|
||||
std.log.Level,
|
||||
"log_level",
|
||||
b.option(std.log.Level, "log_level", "The log level") orelse std.log.Level.info,
|
||||
);
|
||||
|
||||
opts.addOption(
|
||||
bool,
|
||||
"log_unknown_properties",
|
||||
b.option(bool, "log_unknown_properties", "Log access to unknown properties") orelse false,
|
||||
);
|
||||
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
@@ -175,7 +187,7 @@ fn common(b: *std.Build, opts: *std.Build.Step.Options, step: *std.Build.Step.Co
|
||||
else => {},
|
||||
}
|
||||
|
||||
mod.addImport("build_info", opts.createModule());
|
||||
mod.addImport("build_config", opts.createModule());
|
||||
mod.addObjectFile(mod.owner.path(lib_path));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user