Ability to turn off logging #1212
Labels
No labels
CI
all
basisu
blog
bug
build
contributor-friendly
core
correctness
deferred
dev
direct3d-headers
docs
driver-os-issue
duplicate
dxcompiler
editor
examples
experiment
feature-idea
feedback
flac
freetype
gamemode
gkurve
glfw
gpu
gpu-dawn
harfbuzz
help welcome
in-progress
infrastructure
invalid
libmach
linux-audio-headers
long-term
mach
mach.gfx
mach.math
mach.physics
mach.testing
model3d
needs-triage
object
opengl-headers
opus
os/linux
os/macos
os/wasm
os/windows
package-manager
priority
proposal
proposal-accepted
question
roadmap
slipped
stability
sysaudio
sysgpu
sysjs
validating-fix
vulkan-zig-generated
wayland-headers
website
wontfix
wrench
www
x11-headers
xcode-frameworks
zig-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
hexops/mach#1212
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Would be nice if I could turn off logging to the terminal. I always get two lines and a newline about it failing to "CreateInstance in ICD 1" and it having found the Vulkan backend.
Everything works fine so I would like to just turn off logging but I'm not sure how to do so.
As for any error it'd be nice if it returned an error union instead of printing something to the console so I can handle it. Currently it's using
log.errfollowed by astd.process.exit(1)in a bunch of places and I'm not sure that's the best it can do. Maybe I don't want to have my process exited when Mach failed to initialize.The log is scoped to '.mach', so it can be turned off by using a custom log function (zig std.Options.log_scope_levels doesn't seem to be able to turn off logging for a specific scope, only set it to errors only?). Although there seem to be some unscoped logs in the library and those can't be turned off: https://github.com/search?q=repo%3Ahexops%2Fmach%20log.err&type=code
std.process.exit is a problem.