fix show SQL when set logger

This commit is contained in:
Lunny Xiao 2019-06-04 15:30:29 +08:00
parent 6a1dd59737
commit bade7a7a63
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 1 additions and 0 deletions

View File

@ -125,6 +125,7 @@ func (engine *Engine) Logger() core.ILogger {
// SetLogger set the new logger
func (engine *Engine) SetLogger(logger core.ILogger) {
engine.logger = logger
engine.showSQL = logger.IsShowSQL()
engine.dialect.SetLogger(logger)
}