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"