mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-30 18:58:02 +08:00
[ADD] add debug output
This commit is contained in:
parent
5325f8eac5
commit
c210cd4371
@ -39,11 +39,14 @@ type monitor struct {
|
||||
}
|
||||
|
||||
func (m *monitor) GetRule(name string) (*model.AlertingNameConfig, *util.APIHandleError) {
|
||||
println("======>1.1")
|
||||
var ac model.AlertingNameConfig
|
||||
var decode utilhttp.ResponseBody
|
||||
decode.Bean = &ac
|
||||
println("======>1.2")
|
||||
code, err := m.DoRequest(m.prefix+"/"+name, "GET", nil, &decode)
|
||||
if err != nil {
|
||||
println("======err>",code,err)
|
||||
return nil, handleErrAndCode(err, code)
|
||||
}
|
||||
return &ac, nil
|
||||
|
@ -26,7 +26,7 @@ func NewCmdAlerting() cli.Command {
|
||||
logrus.Errorf("need args")
|
||||
return nil
|
||||
}
|
||||
|
||||
println("======name>",name)
|
||||
v, err := clients.RegionClient.Monitor().GetRule(name)
|
||||
println("========>", err.Error())
|
||||
handleErr(err)
|
||||
|
Loading…
Reference in New Issue
Block a user