fix log output

This commit is contained in:
Jeff Carr 2025-08-22 08:55:59 -05:00
parent 249c2a97b8
commit e6737ba635
2 changed files with 7 additions and 2 deletions

View File

@ -1,12 +1,14 @@
package main package main
import ( import (
"log"
"os" "os"
"go.wit.com/log"
) )
func doOutput(s string) { func doOutput(s string) {
f, err := os.OpenFile("/tmp/gemini-output.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) filename := "/tmp/gemini-output.log"
f, err := os.OpenFile(filename, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil { if err != nil {
log.Println(err) log.Println(err)
return return
@ -15,4 +17,6 @@ func doOutput(s string) {
if _, err := f.WriteString(s + "\n"); err != nil { if _, err := f.WriteString(s + "\n"); err != nil {
log.Println(err) log.Println(err)
} }
log.Info("OUTPUT LOGGED TO", filename)
} }

View File

@ -67,6 +67,7 @@ func main() {
for _, newChat := range newChats.GetChats() { for _, newChat := range newChats.GetChats() {
me.chats.AppendByUuid(newChat) me.chats.AppendByUuid(newChat)
log.Info("Attempting to add chat", newChat.ChatName)
} }
me.chats.ConfigSave() me.chats.ConfigSave()