uniform logging

This commit is contained in:
Ettore Di Giacinto
2024-04-19 00:02:00 +02:00
parent 2cba2eafe6
commit 08563c3286
13 changed files with 178 additions and 108 deletions

View File

@@ -3,10 +3,11 @@ package main
import (
"embed"
"log"
"log/slog"
"net/http"
"os"
"github.com/mudler/local-agent-framework/xlog"
"github.com/donseba/go-htmx"
fiber "github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html/v2"
@@ -79,9 +80,9 @@ func main() {
}
if len(db.Database) > 0 && kbdisableIndexing != "true" {
slog.Info("Loading knowledgebase from disk, to skip run with KBDISABLEINDEX=true")
xlog.Info("Loading knowledgebase from disk, to skip run with KBDISABLEINDEX=true")
if err := db.SaveToStore(); err != nil {
slog.Info("Error storing in the KB", err)
xlog.Info("Error storing in the KB", err)
}
}