[ADD] add debug output

This commit is contained in:
zhoujunhao 2018-08-01 12:56:36 +08:00
parent 5325f8eac5
commit c210cd4371
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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)