mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
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:
committed by
Christopher Speller
parent
026f0152a8
commit
1d9c144854
@@ -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}}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user