move to text logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-12-07 16:21:00 +03:00
parent c5f3fa325e
commit 07f67fd1d7
6 changed files with 13 additions and 28 deletions

View File

@@ -8,6 +8,7 @@ import (
"flag"
"fmt"
"io"
stdslog "log/slog"
"net/http"
"os"
"os/exec"
@@ -97,7 +98,7 @@ func main() {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
log := slog.NewLogger()
log := slog.NewLogger(slog.WithHandlerFunc(stdslog.NewTextHandler))
if err = log.Init(logger.WithLevel(logger.DebugLevel)); err != nil {
log.Error(ctx, fmt.Sprintf("logger init error: %v", err))