Skip to content

Commit 34c97dc

Browse files
committed
add debug logging
1 parent e665097 commit 34c97dc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (c *ibmCloudCisProviderSolver) Present(ch *v1alpha1.ChallengeRequest) error
5555
return err
5656
}
5757

58-
log.Debug(fmt.Sprintf("presenting challenge %s -> %s (%s)", ch.DNSName, ch.Key, ch.ResolvedFQDN))
58+
log.Printf("presenting challenge %s -> %s (%s)", ch.DNSName, ch.Key, ch.ResolvedFQDN)
5959

6060
zonesApi := c.ibmCloudCisApi.Zones()
6161

@@ -67,7 +67,7 @@ func (c *ibmCloudCisProviderSolver) Present(ch *v1alpha1.ChallengeRequest) error
6767
}
6868

6969
longestMatchZone := findLongestMatchingZone(myZones, ch.ResolvedFQDN)
70-
log.Debug(fmt.Sprintf("Longest matching zone: %s (id: %s)", longestMatchZone.Name, longestMatchZone.Id))
70+
log.Printf("Longest matching zone for %s: %s", ch.ResolvedFQDN, longestMatchZone.Id)
7171
if longestMatchZone != nil {
7272
if err := c.createDNSChallengeRecord(crn, longestMatchZone.Id, ch); err != nil {
7373
return err
@@ -83,6 +83,7 @@ func findLongestMatchingZone(zones []cis.Zone, fqdn string) *cis.Zone {
8383
var longestMatchLength int
8484

8585
for _, zone := range zones {
86+
log.Printf("zone: %s", zone.Name)
8687
zoneNameWithDot := zone.Name + "."
8788
if strings.HasSuffix(fqdn, zoneNameWithDot) && len(zoneNameWithDot) > longestMatchLength {
8889
longestMatchLength = len(zoneNameWithDot)

0 commit comments

Comments
 (0)