From 7d1f722a9e05b87a84be2ea4a4877e25c18cf13e Mon Sep 17 00:00:00 2001 From: Neur0toxine Date: Tue, 24 Oct 2023 13:01:34 +0300 Subject: [PATCH] allow SetLogger call before Prepare --- core/engine.go | 3 +++ 1 file changed, 3 insertions(+) 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 }