allow SetLogger call before Prepare

This commit is contained in:
Pavel 2023-10-24 13:01:34 +03:00
parent f5bda28e92
commit 7d1f722a9e

View File

@ -260,6 +260,9 @@ func (e *Engine) SetLogger(l logger.Logger) *Engine {
e.mutex.Lock() e.mutex.Lock()
defer e.mutex.Unlock() defer e.mutex.Unlock()
if !e.prepared && e.logger != nil {
return e
}
e.logger = l e.logger = l
return e return e
} }