Fix logging in repo, fix stale auth

This commit is contained in:
2026-02-26 11:23:09 -06:00
parent 385b6ea67c
commit ea7b733767
6 changed files with 84 additions and 58 deletions

View File

@@ -67,6 +67,11 @@ func NewRepo() (*Repo, error) {
func (r *Repo) SetLogFunc(l func(string, ...any)) {
r.logFunc = l
r.handler = NewAppLogHandler(r.logFunc)
if viper.GetBool(KeyDebug) {
r.handler.SetLevel(slog.LevelDebug)
} else {
r.handler.SetLevel(slog.LevelWarn)
}
slog.SetDefault(slog.New(r.handler))
r.Logger = slog.Default()
r.Logger.Debug("New Log Func Set for slog")