Skip to content

Commit

Permalink
Replace debug+sprintf with debugf
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavol Ipoth authored and Pavol Ipoth committed May 9, 2019
1 parent 956be2e commit d7516a2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions registry/txt.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package registry

import (
"errors"
"fmt"
"time"

"strings"
Expand Down Expand Up @@ -95,7 +94,7 @@ func (im *TXTRegistry) Records() ([]*endpoint.Endpoint, error) {
return nil, err
}
endpointDNSName := im.mapper.toEndpointName(record.DNSName)
log.Debug(fmt.Sprintf("Parsed endpoint dns name is %s", endpointDNSName))
log.Debugf("Parsed endpoint dns name is %s", endpointDNSName)
labelMap[endpointDNSName] = labels
}

Expand Down Expand Up @@ -201,8 +200,8 @@ func newPrefixNameMapper(prefix string) prefixNameMapper {
}

func (pr prefixNameMapper) toEndpointName(txtDNSName string) string {
log.Debug(fmt.Sprintf("TXT record is %s", txtDNSName))
log.Debug(fmt.Sprintf("Prefix is %s", pr.prefix))
log.Debugf("TXT record is %s", txtDNSName)
log.Debugf("Prefix is %s", pr.prefix)
prefixLower := strings.ToLower(pr.prefix)
if strings.HasPrefix(txtDNSName, prefixLower) {
log.Debug("Will trim prefix")
Expand Down

0 comments on commit d7516a2

Please sign in to comment.