From 8d9b0c062103066368449953c611cd5316d6fa73 Mon Sep 17 00:00:00 2001 From: LordMathis Date: Thu, 9 Oct 2025 18:56:12 +0200 Subject: [PATCH] Initialize timeProvider and logger in UnmarshalJSON for Process --- pkg/instance/instance.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go index dee38ff..6d33f66 100644 --- a/pkg/instance/instance.go +++ b/pkg/instance/instance.go @@ -285,6 +285,14 @@ func (i *Process) UnmarshalJSON(data []byte) error { i.options = aux.Options } + // Initialize fields that are not serialized + if i.timeProvider == nil { + i.timeProvider = realTimeProvider{} + } + if i.logger == nil && i.globalInstanceSettings != nil { + i.logger = NewInstanceLogger(i.Name, i.globalInstanceSettings.LogsDir) + } + return nil }