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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01912WaK6Rmew3wxZuPyX7E8
This commit is contained in:
Claude
2026-10-08 17:52:46 +00:00
parent c03a67c59f
commit d808749792
+2 -1
View File
@@ -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.