From 748c36becb322ef0a5ba5af250bfddd3bc0f5cbd Mon Sep 17 00:00:00 2001 From: Toni Spets Date: Mon, 27 May 2024 09:34:23 +0300 Subject: [PATCH] Make passive checkpoint logs trace level --- db.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/db.go b/db.go index aaf5b42a..92400612 100644 --- a/db.go +++ b/db.go @@ -1427,7 +1427,11 @@ func (db *DB) execCheckpoint(mode string) (err error) { if err := db.db.QueryRow(rawsql).Scan(&row[0], &row[1], &row[2]); err != nil { return err } - db.Logger.Debug("checkpoint", "mode", mode, "result", fmt.Sprintf("%d,%d,%d", row[0], row[1], row[2])) + if mode == CheckpointModePassive { + db.Logger.Log(context.TODO(), LogLevelTrace, "checkpoint", "mode", mode, "result", fmt.Sprintf("%d,%d,%d", row[0], row[1], row[2])) + } else { + db.Logger.Debug("checkpoint", "mode", mode, "result", fmt.Sprintf("%d,%d,%d", row[0], row[1], row[2])) + } // Reacquire the read lock immediately after the checkpoint. if err := db.acquireReadLock(); err != nil {