diff --git a/core/engine.go b/core/engine.go index 8d87d6b..655920e 100644 --- a/core/engine.go +++ b/core/engine.go @@ -260,6 +260,9 @@ func (e *Engine) SetLogger(l logger.Logger) *Engine { e.mutex.Lock() defer e.mutex.Unlock() + if !e.prepared && e.logger != nil { + return e + } e.logger = l return e }