debug: add WriteDebugLog inside iframe to confirm calendar-data delivery + log.Printf to WriteDebugLog
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user