mirror of
https://github.com/retailcrm/mg-transport-core.git
synced 2024-11-22 05:06:04 +03:00
allow SetLogger call before Prepare
This commit is contained in:
parent
f5bda28e92
commit
7d1f722a9e
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user