summaryrefslogtreecommitdiff
path: root/nexus/database/logger.go
diff options
context:
space:
mode:
Diffstat (limited to 'nexus/database/logger.go')
-rw-r--r--nexus/database/logger.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/nexus/database/logger.go b/nexus/database/logger.go
new file mode 100644
index 0000000..a5eb704
--- /dev/null
+++ b/nexus/database/logger.go
@@ -0,0 +1,14 @@
+package database
+
+import (
+ "nexus/config"
+
+ "gorm.io/gorm/logger"
+)
+
+func resolveGORMLogLevel() logger.Interface {
+ if config.Server.Debug {
+ return logger.Default.LogMode(logger.Info)
+ }
+ return logger.Default.LogMode(logger.Silent)
+}