code refactor

This commit is contained in:
UlricQin 2020-05-12 12:17:06 +08:00
parent 857b905934
commit 180ee94c55
1 changed files with 2 additions and 3 deletions

View File

@ -99,12 +99,11 @@ func PluginRun(plugin *Plugin) {
// exec successfully
data := stdout.Bytes()
if len(data) == 0 {
logger.Debug("stdout of", fpath, "is blank")
logger.Debug("stdout of ", fpath, " is blank")
return
}
logger.Debug(fpath, "stdout:")
logger.Debug(string(data))
logger.Debug(fpath, " stdout: ", string(data))
var items []*dataobj.MetricValue
err = json.Unmarshal(data, &items)