From 614bed64e66b3e1eb7b2d7ea0ad4fdf41f4a20ae Mon Sep 17 00:00:00 2001 From: Moses Narrow <36607567+0pcom@users.noreply.github.com> Date: Sat, 2 May 2026 17:52:38 -0500 Subject: [PATCH] visor: register RuntimeLogs on the RPC server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The hypervisor UI's "view logs" action and 'cli visor logs' both hit Visor.RuntimeLogs() through the RPC client, but the RPC server type (*RPC) had no RuntimeLogs method registered. Stock net/rpc exposes only methods on the registered receiver via reflection, so client calls came back with Rpc: can't find method app-visor.RuntimeLogs. API.RuntimeLogs, Visor.RuntimeLogs, and the rpcClient.RuntimeLogs client wrapper were already in place — the dispatcher in pkg/visor/rpc_visor.go was the missing piece. Add it next to GetRuntimeConfig (same shape: zero-arg in, *string out). --- pkg/visor/rpc_visor.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/visor/rpc_visor.go b/pkg/visor/rpc_visor.go index 9d429e7f2c..e7bfd45e15 100644 --- a/pkg/visor/rpc_visor.go +++ b/pkg/visor/rpc_visor.go @@ -151,6 +151,16 @@ func (r *RPC) GetRuntimeConfig(_ *struct{}, out *[]byte) (err error) { return err } +// RuntimeLogs returns the visor's accumulated runtime log buffer. +// Used by the hypervisor UI's "view logs" action and the +// `skywire cli visor logs` command. +func (r *RPC) RuntimeLogs(_ *struct{}, out *string) (err error) { + defer rpcutil.LogCall(r.log, "RuntimeLogs", nil)(out, &err) + logs, err := r.visor.RuntimeLogs() + *out = logs + return err +} + // GetConfigPath returns the filesystem path the visor loaded its config from. func (r *RPC) GetConfigPath(_ *struct{}, out *string) (err error) { defer rpcutil.LogCall(r.log, "GetConfigPath", nil)(out, &err)