From 125ccc5c3bda1d52c64649ca369c4d8812bdfbec Mon Sep 17 00:00:00 2001 From: hoteas Date: Wed, 17 Aug 2022 17:10:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/hotimedb.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/hotimedb.go b/db/hotimedb.go index 8b0f0da..cea7e59 100644 --- a/db/hotimedb.go +++ b/db/hotimedb.go @@ -534,7 +534,7 @@ func (that *HoTimeDB) md5(query string, args ...interface{}) string { func (that *HoTimeDB) Query(query string, args ...interface{}) []Map { defer func() { - if that.Mode == 2 { + if that.Mode != 0 { that.Log.Info("SQL:"+that.LastQuery, " DATA:", that.LastData, " ERROR:", that.LastErr.GetError()) } }() @@ -582,7 +582,7 @@ func (that *HoTimeDB) Query(query string, args ...interface{}) []Map { func (that *HoTimeDB) Exec(query string, args ...interface{}) (sql.Result, *Error) { defer func() { - if that.Mode == 2 { + if that.Mode != 0 { that.Log.Info("SQL: "+that.LastQuery, " DATA: ", that.LastData, " ERROR: ", that.LastErr.GetError()) } }()