fix log space

This commit is contained in:
Lunny Xiao 2017-03-17 20:25:07 +08:00
parent 7daacb215e
commit e8409d7325
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 2 additions and 2 deletions

View File

@ -279,9 +279,9 @@ func (b *Base) ForUpdateSql(query string) string {
func (b *Base) LogSQL(sql string, args []interface{}) { func (b *Base) LogSQL(sql string, args []interface{}) {
if b.logger != nil && b.logger.IsShowSQL() { if b.logger != nil && b.logger.IsShowSQL() {
if len(args) > 0 { if len(args) > 0 {
b.logger.Info("[sql]", sql, args) b.logger.Infof("[SQL] %v %v", sql, args)
} else { } else {
b.logger.Info("[sql]", sql) b.logger.Infof("[SQL] %v", sql)
} }
} }
} }