From c6038a8f0c9807be810f89b868646d6c74fb6528 Mon Sep 17 00:00:00 2001 From: Evan Chen Date: Mon, 3 Jan 2022 13:08:09 +0800 Subject: [PATCH] update --- db.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/db.go b/db.go index af63cb2..b30055d 100644 --- a/db.go +++ b/db.go @@ -18,9 +18,12 @@ func connectToDB() { DB_HOST, DB_USER, DB_PASSWD, DB_NAME, DB_PORT, ) config := &gorm.Config{ - Logger: logger.Default, + Logger: logger.Discard, SkipDefaultTransaction: true, } + if flagDev { + config.Logger = logger.Default + } for { db, err := gorm.Open(postgres.New(postgres.Config{ DSN: dsn, // data source name