From 6ca27e79bfea964a525229eebde19c4fb7ae17d0 Mon Sep 17 00:00:00 2001 From: Branden J Brown Date: Thu, 5 Nov 2026 15:36:01 -0500 Subject: [PATCH] cmd/ismdb: less noisy --- cmd/ismdb/db.go | 4 ++-- cmd/ismdb/main.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/ismdb/db.go b/cmd/ismdb/db.go index d4a505d..2db5d7e 100644 --- a/cmd/ismdb/db.go +++ b/cmd/ismdb/db.go @@ -66,8 +66,8 @@ func insert(ctx context.Context, db *sqlitemigration.Pool, log *slog.Logger, car // if there's something wrong with the db. if err := insertCareer(conn, log, career, trainerID); err != nil { code := sqlite.ErrCode(err) - if code == sqlite.ResultConstraintUnique { - log.InfoContext(ctx, "already loaded") + if code == sqlite.ResultConstraintPrimaryKey { + log.DebugContext(ctx, "already loaded") return nil } return err diff --git a/cmd/ismdb/main.go b/cmd/ismdb/main.go index 3ab8777..885673c 100644 --- a/cmd/ismdb/main.go +++ b/cmd/ismdb/main.go @@ -47,7 +47,7 @@ func main() { ok := 0 for _, n := range fs { log := log.With(slog.String("file", n)) - log.Info("begin") + log.Debug("begin") f, err := os.Open(n) if err != nil { log.Error("open", slog.Any("err", err))