debug: add WriteDebugLog inside iframe to confirm calendar-data delivery + log.Printf to WriteDebugLog

This commit is contained in:
2026-06-08 12:34:14 +08:00
parent c03e2e2961
commit f4a25128ae
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -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)