From fdfcff2bb56073e823521e93076db843984a8c27 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 7 Dec 2025 03:15:21 +0000 Subject: [PATCH] Mac: link Debug log button to pino log --- apps/macos/Sources/Clawdis/DebugSettings.swift | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/macos/Sources/Clawdis/DebugSettings.swift b/apps/macos/Sources/Clawdis/DebugSettings.swift index 2e85b4237..cb70e8533 100644 --- a/apps/macos/Sources/Clawdis/DebugSettings.swift +++ b/apps/macos/Sources/Clawdis/DebugSettings.swift @@ -15,7 +15,8 @@ struct DebugSettings: View { VStack(alignment: .leading, spacing: 10) { LabeledContent("PID") { Text("\(ProcessInfo.processInfo.processIdentifier)") } LabeledContent("Log file") { - Button("Open /tmp/clawdis.log") { NSWorkspace.shared.open(URL(fileURLWithPath: "/tmp/clawdis.log")) } + Button("Open pino log") { NSWorkspace.shared.open(URL(fileURLWithPath: self.pinoLogPath)) } + .help(self.pinoLogPath) } LabeledContent("Binary path") { Text(Bundle.main.bundlePath).font(.footnote) } LabeledContent("Relay status") { @@ -112,6 +113,15 @@ struct DebugSettings: View { .task { await self.reloadModels() } } + private var pinoLogPath: String { + let df = DateFormatter() + df.calendar = Calendar(identifier: .iso8601) + df.locale = Locale(identifier: "en_US_POSIX") + df.dateFormat = "yyyy-MM-dd" + let today = df.string(from: Date()) + return "/tmp/clawdis/clawdis-\(today).log" + } + private func chooseCatalogFile() { let panel = NSOpenPanel() panel.title = "Select models.generated.ts"