diff --git a/cmd/verstak-gui/bindings_debug.go b/cmd/verstak-gui/bindings_debug.go index f462935..f684774 100644 --- a/cmd/verstak-gui/bindings_debug.go +++ b/cmd/verstak-gui/bindings_debug.go @@ -2,6 +2,7 @@ package main import ( "fmt" + "log" "os" "path/filepath" "time" @@ -13,6 +14,7 @@ func (a *App) WriteDebugLog(msg string) { if !a.IsReady() { return } + log.Printf("[js] %s", msg) logPath := filepath.Join(a.vault, ".verstak", "debug.log") line := fmt.Sprintf("[%s] %s\n", time.Now().Format("2006-01-02T15:04:05"), msg) f, err := os.OpenFile(logPath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o644) diff --git a/contrib/plugins/calendar/panels/calendar.html b/contrib/plugins/calendar/panels/calendar.html index 4eed23c..d3f3c3e 100644 --- a/contrib/plugins/calendar/panels/calendar.html +++ b/contrib/plugins/calendar/panels/calendar.html @@ -431,6 +431,7 @@ body { switch (msg.type) { case 'calendar-data': + try { window.parent.go.main.App.WriteDebugLog('[iframe] received calendar-data, events=' + (msg.events ? msg.events.length : 0) + ', categories=' + (msg.categories ? msg.categories.length : 0)); } catch(e) { try { console.log('iframe debug error: ' + e); } catch(e2) {} } if (msg.events) state.events = msg.events; if (msg.categories) state.categories = msg.categories; state.eventsLoaded = true;