mirror of
https://github.com/luxfi/vm.git
synced 2026-10-30 15:13:40 +00:00
Log is an interface, so an unset one has no dynamic type and IsZero() has nothing to call: the guard against a missing logger was itself the line that dereferenced it, and it panicked on the exact input it names. rpc.factory.New forwards the logger it is handed without looking at it, so an unset one reaches Bootstrap rather than being caught upstream. Reading the nil first, rather than defaulting to Noop, is what the rest of the switch already does with a missing Stdout or Stderr: a caller that omitted a required field is told so. Defaulting would also contradict the check it replaces, since NoLog.IsZero() is true and is refused here on purpose. Co-authored-by: Hanzo Dev <[email protected]>