vectorcraft/docs
Gert Pellin ba9edcdc7f Desktop: write log records to standard error and a rotating log file
The desktop app installed no logger, so every log::warn!/log::error! in
the workspace was discarded: the graphics adapter in use, a lost graphics
device, the engine guard's report of a recovered panic. A launch from a
desktop menu has no terminal either, so there was nothing to attach to a
bug report.

apps/vectorcraft/src/logging.rs (no new dependency):
- standard error plus logs/vectorcraft.log next to the preferences
  (~/.config/vectorcraft/logs, or under $XDG_CONFIG_HOME); each launch
  rotates the previous log to vectorcraft.1.log and .2.log, so the log of
  a run that crashed survives the next start; the file is capped at 16 MiB
- records logged before the settings directory is known are buffered
  (bounded) and written once the file is attached
- default levels: info for vectorcraft*, warn for everything else;
  RUST_LOG replaces them with env_logger-style directives
- never panics: an unusable directory or a failed write leaves standard
  error as the only sink
- runs with VECTORCRAFT_NO_PREFS (agents' test runs) log to standard
  error only, so they don't rotate away the user's own logs

The logger is installed first in main and the file is opened after
argument parsing (--version leaves no file). Log messages of this crate
drop their "vectorcraft: " prefix, which the record's target now shows.
vectorcraft-cli keeps its own MCP logger (vectorcraft_mcp::logging).
Documented in docs/development.md (Logs, Environment variables).
2026-10-08 17:07:08 +07:00
..
brand Licensing: MIT OR Apache-2.0 files, NOTICE, ArtCraft brand terms 2026-10-04 10:05:13 -04:00
images README: refresh the screenshots and renders, add a Perspective Grid shot 2026-10-08 02:39:29 +07:00
contributors.md About: contributor and model credits compiled in (grab bag + table, self-submitted names) (#411) 2026-10-07 21:22:04 -04:00
control-protocol.md Properties: Fill and Stroke; Shift+F7 opens Align; Alt+wheel zooms 2026-10-08 16:46:34 +07:00
development.md Desktop: write log records to standard error and a rotating log file 2026-10-08 17:07:08 +07:00
mcp.md AI import: groups and nested groups survive 2026-10-08 17:06:57 +07:00
plugins.md Fix #121: sandboxed WebAssembly plug-ins: object filters and live effects 2026-10-06 00:19:41 +07:00
releasing.md Fix #295: open files from the macOS Finder and Dock 2026-10-08 05:28:50 +07:00
windows7.md M14: Windows 7 build: patch windows-link for that build only, manual CI 2026-10-08 05:37:06 +07:00