summaryrefslogtreecommitdiffstats
path: root/plugin/client_rpc.go
diff options
context:
space:
mode:
authorJesse Hallam <jesse.hallam@gmail.com>2018-07-27 11:17:29 -0400
committerChristopher Speller <crspeller@gmail.com>2018-07-27 08:17:29 -0700
commit1d9c14485470d2399bb3ee578c11b0c50fb640c7 (patch)
tree2e1d318ee3d0ed88399ad3979b0fb58be52248c5 /plugin/client_rpc.go
parent026f0152a8fdc81d9d96c9d62321a78ef65d837b (diff)
downloadchat-1d9c14485470d2399bb3ee578c11b0c50fb640c7.tar.gz
chat-1d9c14485470d2399bb3ee578c11b0c50fb640c7.tar.bz2
chat-1d9c14485470d2399bb3ee578c11b0c50fb640c7.zip
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.
Diffstat (limited to 'plugin/client_rpc.go')
-rw-r--r--plugin/client_rpc.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugin/client_rpc.go b/plugin/client_rpc.go
index f5831445e..4ea7c1cdc 100644
--- a/plugin/client_rpc.go
+++ b/plugin/client_rpc.go
@@ -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))