removed fmt.Println

This commit is contained in:
azhar 2016-07-04 16:31:18 +05:30
parent 68e7f78343
commit 0fc2a195da
3 changed files with 2 additions and 9 deletions

Binary file not shown.

Binary file not shown.

View File

@ -186,7 +186,6 @@ func (a *Aerospike) Gather(acc telegraf.Accumulator) error {
latencyInfo, err := a.get(LATENCY_COMMAND, host) latencyInfo, err := a.get(LATENCY_COMMAND, host)
if err != nil { if err != nil {
fmt.Println("gathering latency failed ", err)
return fmt.Errorf("Latency info failed %s", err.Error()) return fmt.Errorf("Latency info failed %s", err.Error())
} }
@ -273,10 +272,9 @@ func (a *Aerospike) get(key []byte, host string) (map[string]string, error) {
defer conn.Close() defer conn.Close()
if a.EnableAuth { if a.EnableAuth {
fmt.Println("Going to authenticate")
err = a.authenticate(conn) err = a.authenticate(conn)
if err != nil { if err != nil {
fmt.Println("Authentication failed with error ", err) //fmt.Println("Authentication failed with error ", err)
return data, err return data, err
} }
} }
@ -332,7 +330,6 @@ func (a *Aerospike) authenticate(conn *net.TCPConn) error {
pw, err := bcrypt.Hash(a.Password, "$2a$10$7EqJtq98hPqEX7fNZaFWoO") pw, err := bcrypt.Hash(a.Password, "$2a$10$7EqJtq98hPqEX7fNZaFWoO")
if err != nil { if err != nil {
fmt.Println("Failed to hash password", err)
return err return err
} }
@ -377,8 +374,6 @@ func (a *Aerospike) authenticate(conn *net.TCPConn) error {
return fmt.Errorf("Failed to read from connection to '%s': ", err) return fmt.Errorf("Failed to read from connection to '%s': ", err)
} }
fmt.Println("Got: ", buffer)
errorCode := int(buffer[1]) errorCode := int(buffer[1])
if (errorCode == ERR_NOT_SUPPORTED || errorCode == ERR_NOT_ENABLED) && a.AutoAuthDisable { if (errorCode == ERR_NOT_SUPPORTED || errorCode == ERR_NOT_ENABLED) && a.AutoAuthDisable {
@ -395,8 +390,6 @@ func (a *Aerospike) authenticate(conn *net.TCPConn) error {
return fmt.Errorf("Authentication request failed with errorcode %d", errorCode) return fmt.Errorf("Authentication request failed with errorcode %d", errorCode)
} }
fmt.Println("Authenticated with return code ", errorCode)
return nil return nil
} }
@ -457,7 +450,7 @@ func readAerospikeLatency(
metric := metrName + "_" + unitTimes[i] //strings.Replace(unitTimes[i], ">", "_gt_", 1) metric := metrName + "_" + unitTimes[i] //strings.Replace(unitTimes[i], ">", "_gt_", 1)
value, err := strconv.ParseFloat(vals[i], 64) value, err := strconv.ParseFloat(vals[i], 64)
if err != nil { if err != nil {
fmt.Println("Failed to parse float when parsing latency ") //fmt.Println("Failed to parse float when parsing latency ")
continue continue
} }
fields[metric] = value fields[metric] = value