atagen

monolith

public
Star0
Watch0

Commit efa15bffcd6b

tarball

atagen <boss@atagen.co>2026-10-16 13:18 UTC

3 files changed+31-0
monolith: log to stderr, without colour when it is not a terminal

tracing wrote to stdout, so redirecting stderr to a file captured client output and none of the compositor log.
Modified file: crates/monolith/src/main.rs+2 additions
@@ -95,6 +95,8 @@ fn main() -> ExitCode {
9595 .with_env_filter(
9696 EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")),
9797 )
98+ .with_writer(std::io::stderr)
99+ .with_ansi(std::io::IsTerminal::is_terminal(&std::io::stderr()))
98100 .init();
99101 let backend = match backend {
100102 Backend::Auto if std::env::var_os("WAYLAND_DISPLAY").is_some() => Backend::Nested,
Added file: monolith.log+5 additions
@@ -0,0 +1,5 @@
1+ Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.06s
2+ Running `target/debug/monolith run --backend drm , vkcube`
3+Selected WSI platform: wayland
4+Selected GPU 0: NVIDIA GeForce RTX 3060, type: DiscreteGpu, apiVersion: 4211017 (1.4.329), driverVersion: -1797652352 (83.416.128)
5+Io error: Broken pipe (os error 32)
Added file: write+24 additions
@@ -0,0 +1,24 @@
1+ Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.07s
2+ Running `target/debug/monolith run --backend drm , vkcube monolith.log`
3+2026-10-16T13:15:52.268659Z  INFO monolith::drm: primary GPU path=/dev/dri/card1
4+2026-10-16T13:15:52.483545Z  INFO monolith::drm: output connected name="DP-2" w=2560 h=1440 refresh=165
5+2026-10-16T13:15:52.483705Z  INFO monolith::ipc: control socket path=/run/user/1000/monolith-wayland-2.sock
6+2026-10-16T13:15:52.483730Z  INFO monolith: monolith running socket="wayland-2" device="NVIDIA GeForce RTX 3060"
7+2026-10-16T13:15:52.484186Z  INFO monolith::commands: spawned pid=334214 argv=[",", "vkcube", "monolith.log"]
8+Usage:
9+ vkcube [--use_staging] [--validate]
10+ [--break] [--c <framecount>] [--suppress_popups]
11+ [--incremental_present] [--display_timing]
12+ [--gpu_number <index of physical device>]
13+ [--present_mode <present mode enum>]
14+ [--width <width>] [--height <height>]
15+ [--force_errors]
16+ [--wsi <xcb|xlib|wayland|display>]
17+ <present_mode_enum>
18+ VK_PRESENT_MODE_IMMEDIATE_KHR = 0
19+ VK_PRESENT_MODE_MAILBOX_KHR = 1
20+ VK_PRESENT_MODE_FIFO_KHR = 2
21+ VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3
22+2026-10-16T13:15:52.502193Z DEBUG monolith::drm: slow frame output="DP-2" took_ns=17909067
23+2026-10-16T13:15:52.508712Z DEBUG monolith::drm: frame rate output="DP-2" presented=1 vblanks=8326874 budget_us=19909
24+2026-10-16T13:15:55.925022Z DEBUG monolith::input: bind cmd=Quit