Merge branch 'master-1'
# Conflicts: # cmd/pkgdashcli/main.go # go.mod # go.sum # internal/cli/init.go # internal/source/gitea/gitea.go
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
@@ -94,12 +94,11 @@ func pkgdashcli() {
|
||||
|
||||
for _, configDir := range configDirs {
|
||||
for _, configFile := range configFiles {
|
||||
logger.Info(ctx, fmt.Sprintf("path: %s", filepath.Join(configDir, configFile)))
|
||||
c := fileconfig.NewConfig(
|
||||
config.AllowFail(false),
|
||||
config.Struct(cfg),
|
||||
options.Codec(yamlcodec.NewCodec()),
|
||||
fileconfig.Path(".gitea/pkgdashcli.yaml"),
|
||||
fileconfig.Path(filepath.Join(configDir, configFile)),
|
||||
)
|
||||
err = c.Init(options.Context(ctx))
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user