mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-25 10:37:11 -06:00
lightcraft-cli installed no `log` backend, so every log::warn!/info! record (the GPU-to-CPU fallback, an unknown LIGHTCRAFT_GPU_BACKEND, the adapter chosen) was dropped and RUST_LOG, which docs/gpu-pipeline.md documents for the fallback warning, did nothing. The desktop app had its own logger that read only LIGHTCRAFT_LOG. Both now install lightcraft_engine::logging: warnings and errors on stderr by default; LIGHTCRAFT_LOG or RUST_LOG (off, error, warn, info, debug, trace) picks another level, LIGHTCRAFT_LOG winning, and RUST_LOG's per-target directives (`lightcraft=debug,wgpu=warn`) set LightCraft's level. Below warnings only LightCraft's own records are shown, as the app's logger did. The app's --help lists the variable. Tests: level parsing and target filtering (engine logging::tests); the CLI prints "LIGHTCRAFT_GPU_BACKEND=bogus names no known backend" with RUST_LOG=warn and nothing with RUST_LOG=off (cli.rs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K3vVft4VXvvy8SpbbUceTW