summaryrefslogtreecommitdiff
path: root/internal/db
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db')
-rw-r--r--internal/db/bundb/bundb.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/db/bundb/bundb.go b/internal/db/bundb/bundb.go
index f190ce5ea..a79e7e4f4 100644
--- a/internal/db/bundb/bundb.go
+++ b/internal/db/bundb/bundb.go
@@ -136,9 +136,9 @@ func NewBunDBService(ctx context.Context) (db.DB, error) {
return nil, fmt.Errorf("database type %s not supported for bundb", dbType)
}
- // add a hook to just log queries and the time they take
+ // add a hook to log queries and the time they take
// only do this for logging where performance isn't 1st concern
- if logrus.GetLevel() >= logrus.DebugLevel {
+ if logrus.GetLevel() >= logrus.DebugLevel && viper.GetBool(config.Keys.LogDbQueries) {
conn.DB.AddQueryHook(newDebugQueryHook())
}