From d80874979232a0ad10c22f2ca78574aa37afb9b8 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Oct 2026 17:52:46 +0000 Subject: [PATCH] Desktop: a --memory session writes no log file (#286 with #288) #288 made --memory sessions write nothing (issue #164); #286's log file would have been the exception. It is not opened there. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01912WaK6Rmew3wxZuPyX7E8 --- apps/lightcraft/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/lightcraft/src/main.rs b/apps/lightcraft/src/main.rs index f26725cf0..409519be6 100644 --- a/apps/lightcraft/src/main.rs +++ b/apps/lightcraft/src/main.rs @@ -514,7 +514,8 @@ fn main() -> eframe::Result { // The log file: opened after the arguments, so `--version`, `--help` and a usage error leave // no file behind. Records logged until now are written to it first. if let Some(logger) = logger { - match log_dir() { + // a --memory session writes nothing (issue #164), a log file included + match log_dir().filter(|_| !in_memory) { Some(dir) => match logger.attach_dir(&dir) { Ok(path) => log::info!("LightCraft {}, log file {}", env!("CARGO_PKG_VERSION"), path.display()), // The file sink has given up by now, so this goes to standard error only.