update for latest micro changes

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-03-25 22:54:25 +03:00
parent ec5c6c591d
commit c362702c40
17 changed files with 1106 additions and 1043 deletions

View File

@@ -7,7 +7,7 @@ import (
"io/fs"
"net/http"
"time"
slog "go.unistack.org/micro/v4/logger/slog"
appconfig "git.unistack.org/unistack-org/pkgdash/internal/config"
"git.unistack.org/unistack-org/pkgdash/internal/database"
"git.unistack.org/unistack-org/pkgdash/internal/handler"
@@ -21,7 +21,6 @@ import (
envconfig "go.unistack.org/micro-config-env/v4"
fileconfig "go.unistack.org/micro-config-file/v4"
vaultconfig "go.unistack.org/micro-config-vault/v4"
zlogger "go.unistack.org/micro-logger-zerolog/v4"
victoriameter "go.unistack.org/micro-meter-victoriametrics/v4"
httpsrv "go.unistack.org/micro-server-http/v4"
healthhandler "go.unistack.org/micro-server-http/v4/handler/health"
@@ -54,7 +53,7 @@ func main() {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
logger.DefaultLogger = zlogger.NewLogger(zlogger.ReportCaller(), logger.WithLevel(logger.DebugLevel), logger.WithCallerSkipCount(4))
logger.DefaultLogger = slog.NewLogger(logger.WithLevel(logger.DebugLevel))
if err := logger.DefaultLogger.Init(); err != nil {
logger.Fatal(ctx, "failed to init logger")
}