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()) } }()