adding log append
Robert Ismo me@robertismo.com
Fri, 26 Jun 2026 19:08:32 -0500
4 files changed,
17 insertions(+),
0 deletions(-)
M
app.go
→
app.go
@@ -3,6 +3,8 @@
import ( "context" "time" + "path/filepath" + "os" "github.com/adrg/xdg" "github.com/sanbornm/go-selfupdate/selfupdate"@@ -152,3 +154,7 @@ func (app *App) GetMailPasswordKeyringService() string {
title := app.GetTitle() return title + "-mail-password" } + +func (app *App) GetTmpLogFile() string { + return filepath.Join(os.TempDir(), app.GetTitle()+".log") +}
M
logger.go
→
logger.go
@@ -3,6 +3,7 @@
import ( "context" "fmt" + "os" "time" "github.com/wailsapp/wails/v2/pkg/runtime"@@ -17,6 +18,11 @@
func (app *App) Log(format string, a ...any) *LogMessage { log := LogMessage{context: app.ctx} log.message = fmt.Sprintf(format, a...) + os.WriteFile( + app.GetTmpLogFile(), + []byte(log.message), + os.ModeAppend, + ) return &log }
M
mailaccount.go
→
mailaccount.go
@@ -423,6 +423,10 @@ }
func (app *App) watchMailbox(email string, conn MailAccountConnection) { mailbox := SourceMailboxes[0] + if conn.ImapClient == nil { + RemoveMailConnection(email) + return + } for { select { case <-app.idleCtx.Done():