remove logs

This commit is contained in:
Ulric Qin 2022-04-18 23:50:04 +08:00
parent 573d70fc37
commit 3853f1c7c0
1 changed files with 0 additions and 10 deletions

View File

@ -178,10 +178,7 @@ func (o *Oracle) scrapeMetric(waitMetrics *sync.WaitGroup, slist *list.SafeList,
log.Println("D! columns:", cols)
}
log.Println("444444")
for rows.Next() {
log.Println("55555")
columns := make([]interface{}, len(cols))
columnPointers := make([]interface{}, len(cols))
for i := range columns {
@ -202,8 +199,6 @@ func (o *Oracle) scrapeMetric(waitMetrics *sync.WaitGroup, slist *list.SafeList,
m[strings.ToLower(colName)] = fmt.Sprint(*val)
}
log.Println("666666")
count := 0
if err = o.parseRow(m, metricConf, slist, tags); err != nil {
log.Println("E! failed to parse row:", err)
@ -212,8 +207,6 @@ func (o *Oracle) scrapeMetric(waitMetrics *sync.WaitGroup, slist *list.SafeList,
count++
}
log.Println("77777 count:", count)
if !metricConf.IgnoreZeroResult && count == 0 {
log.Println("E! no metrics found while parsing")
}
@ -221,7 +214,6 @@ func (o *Oracle) scrapeMetric(waitMetrics *sync.WaitGroup, slist *list.SafeList,
}
func (o *Oracle) parseRow(row map[string]string, metricConf MetricConfig, slist *list.SafeList, tags map[string]string) error {
log.Println("33333")
labels := make(map[string]string)
for k, v := range tags {
labels[k] = v
@ -242,11 +234,9 @@ func (o *Oracle) parseRow(row map[string]string, metricConf MetricConfig, slist
}
if metricConf.FieldToAppend == "" {
log.Println("1111111", metricConf.Mesurement+"_"+column, value, labels)
slist.PushFront(inputs.NewSample(metricConf.Mesurement+"_"+column, value, labels))
} else {
suffix := cleanName(row[metricConf.FieldToAppend])
log.Println("2222222", metricConf.Mesurement+"_"+suffix+"_"+column, value, labels)
slist.PushFront(inputs.NewSample(metricConf.Mesurement+"_"+suffix+"_"+column, value, labels))
}
}