Skip to content
Snippets Groups Projects
Commit 2c4c4ac2 authored by KERDREUX Jerome's avatar KERDREUX Jerome
Browse files

Switch slog in xaal module

parent 365e591a
No related branches found
No related tags found
No related merge requests found
......@@ -3,11 +3,7 @@ package main
import (
"flag"
"fmt"
"log/slog"
"os"
"github.com/lmittmann/tint"
"github.com/mattn/go-isatty"
"gitlab.imt-atlantique.fr/xaal/code/go/core/xaal"
)
......@@ -24,21 +20,10 @@ func main() {
return
}
// level := "DEBUG"
w := os.Stderr
logger := slog.New(
tint.NewHandler(w, &tint.Options{
NoColor: !isatty.IsTerminal(w.Fd()),
TimeFormat: "2006/01/02 15:04:05",
Level: slog.LevelDebug,
AddSource: true,
}),
)
slog.SetDefault(logger)
client := setupMQTT(*mqttBroker, 1883)
// client.Publish("zigbee2mqtt/0x70b3d52b600f89d3/set", 0, false, `{"state": "toggle"}`)
xaal.SetupLogger()
eng = xaal.NewEngine()
eng.Start()
eng.Run()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment