Initialize timeProvider and logger in UnmarshalJSON for Process

This commit is contained in:
2025-10-09 18:56:12 +02:00
parent 6c1a76691d
commit 8d9b0c0621

View File

@@ -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
}