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.
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
026f0152a8
Коммит
1d9c144854
@@ -56,7 +56,6 @@ func (p *hooksPlugin) Client(b *plugin.MuxBroker, client *rpc.Client) (interface
|
||||
|
||||
type apiRPCClient struct {
|
||||
client *rpc.Client
|
||||
log *mlog.Logger
|
||||
}
|
||||
|
||||
type apiRPCServer struct {
|
||||
@@ -198,7 +197,7 @@ func (g *apiRPCClient) LoadPluginConfiguration(dest interface{}) error {
|
||||
_args := &Z_LoadPluginConfigurationArgsArgs{}
|
||||
_returns := &Z_LoadPluginConfigurationArgsReturns{}
|
||||
if err := g.client.Call("Plugin.LoadPluginConfiguration", _args, _returns); err != nil {
|
||||
g.log.Error("RPC call to LoadPluginConfiguration API failed.", mlog.Err(err))
|
||||
log.Printf("RPC call to LoadPluginConfiguration API failed: %s", err.Error())
|
||||
}
|
||||
if err := json.Unmarshal(_returns.A, dest); err != nil {
|
||||
g.log.Error("LoadPluginConfiguration API failed to unmarshal.", mlog.Err(err))
|
||||
|
||||
Ссылка в новой задаче
Block a user