@@ -4,6 +4,7 @@ import (
7 // "path/filepath"
8 // "path/filepath"
8 "encoding/json"
9 "encoding/json"
@@ -22,6 +23,7 @@ func getCaller() string {
23 return caller
24 return caller
25func Info(msg string, args ...any) {
27func Info(msg string, args ...any) {
26 source := getCaller()
28 source := getCaller()
27 slog.Info(msg, append([]any{"source", source}, args...)...)
29 slog.Info(msg, append([]any{"source", source}, args...)...)
@@ -122,7 +124,7 @@ func AppendToSessionLogFile(sessionId string, filename string, content string) s
123 filePath := fmt.Sprintf("%s/%s", sessionPath, filename)
125 filePath := fmt.Sprintf("%s/%s", sessionPath, filename)
125− f, err := os.OpenFile(filePath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
127+ f, err := os.OpenFile(filePath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o644)
126 if err != nil {
128 if err != nil {
127 Error("Failed to open session log file", "filepath", filePath, "error", err)
129 Error("Failed to open session log file", "filepath", filePath, "error", err)
128 return ""
130 return ""