s/mlog/log/ in apiRPCClient (#9171)

We never actually initialized `log` on apiRPCClient, and it can't log
without making an RPC call anyway, so just switch to logging errors from
the plugin to STDERR instead.
This commit is contained in:
Jesse Hallam
2018-07-27 11:17:29 -04:00
committed by Christopher Speller
parent 026f0152a8
commit 1d9c144854
3 changed files with 55 additions and 55 deletions

View File

@@ -258,7 +258,7 @@ func (g *apiRPCClient) {{.Name}}{{funcStyle .Params}} {{funcStyle .Return}} {
_args := &{{.Name | obscure}}Args{ {{valuesOnly .Params}} }
_returns := &{{.Name | obscure}}Returns{}
if err := g.client.Call("Plugin.{{.Name}}", _args, _returns); err != nil {
g.log.Error("RPC call to {{.Name}} API failed.", mlog.Err(err))
log.Printf("RPC call to {{.Name}} API failed: %s", err.Error())
}
return {{destruct "_returns." .Return}}
}