Merge branch 'master' of github.com:d4l3k/gorm
This commit is contained in:
		
						commit
						34a3fd2a3a
					
				
							
								
								
									
										3
									
								
								scope.go
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								scope.go
									
									
									
									
									
								
							@ -4,6 +4,7 @@ import (
 | 
				
			|||||||
	"database/sql/driver"
 | 
						"database/sql/driver"
 | 
				
			||||||
	"errors"
 | 
						"errors"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
						"log"
 | 
				
			||||||
	"regexp"
 | 
						"regexp"
 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
@ -361,6 +362,8 @@ func (scope *Scope) InstanceGet(name string) (interface{}, bool) {
 | 
				
			|||||||
// Trace print sql log
 | 
					// Trace print sql log
 | 
				
			||||||
func (scope *Scope) Trace(t time.Time) {
 | 
					func (scope *Scope) Trace(t time.Time) {
 | 
				
			||||||
	if len(scope.Sql) > 0 {
 | 
						if len(scope.Sql) > 0 {
 | 
				
			||||||
 | 
							// TODO(d4l3k): Remove this line
 | 
				
			||||||
 | 
							log.Println("sql", scope.Sql, scope.SqlVars)
 | 
				
			||||||
		scope.db.slog(scope.Sql, t, scope.SqlVars...)
 | 
							scope.db.slog(scope.Sql, t, scope.SqlVars...)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user