diff --git a/src/platform/native.zig b/src/platform/native.zig index 2a266016..4cf8ab64 100644 --- a/src/platform/native.zig +++ b/src/platform/native.zig @@ -8,6 +8,9 @@ const enums = @import("../enums.zig"); const util = @import("util.zig"); const c = @import("c.zig").c; +pub const scope_levels = if (@hasDecl(App, "scope_levels")) App.scope_levels else [0]std.log.ScopeLevel{}; +pub const log_level = if (@hasDecl(App, "log_level")) App.log_level else std.log.default_level; + pub const Platform = struct { window: glfw.Window, backend_type: gpu.Adapter.BackendType, diff --git a/src/platform/wasm.zig b/src/platform/wasm.zig index 176a2b60..13da5883 100644 --- a/src/platform/wasm.zig +++ b/src/platform/wasm.zig @@ -231,7 +231,8 @@ export fn wasmDeinit() void { app.deinit(&engine); } -pub const log_level = .info; +pub const log_level = if (@hasDecl(App, "log_level")) App.log_level else .info; +pub const scope_levels = if (@hasDecl(App, "scope_levels")) App.scope_levels else [0]std.log.ScopeLevel{}; const LogError = error{}; const LogWriter = std.io.Writer(void, LogError, writeLog);