Skip to content

Commit

Permalink
move from debugf to infof
Browse files Browse the repository at this point in the history
  • Loading branch information
cadenmarchese committed Dec 12, 2023
1 parent e2acf59 commit 21f0e23
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hack/clean/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,24 +153,24 @@ func (s settings) shouldDelete(resourceGroup mgmtfeatures.ResourceGroup, log *lo

for t := range resourceGroup.Tags {
if strings.ToLower(t) == defaultKeepTag {
log.Debugf("Group %s is to persist. SKIP.", *resourceGroup.Name)
log.Infof("Group %s is to persist. SKIP.", *resourceGroup.Name)
return false
}
}

// azure tags is not consistent with lower/upper cases.
if _, ok := resourceGroup.Tags[s.createdTag]; !ok {
log.Debugf("Group %s does not have createdAt tag. SKIP.", *resourceGroup.Name)
log.Infof("Group %s does not have createdAt tag. SKIP.", *resourceGroup.Name)
return false
}

createdAt, err := time.Parse(time.RFC3339Nano, *resourceGroup.Tags[s.createdTag])
if err != nil {
log.Errorf("%s: %s", *resourceGroup.Name, err)
log.Infof("%s: %s", *resourceGroup.Name, err)
return false
}
if time.Since(createdAt) < s.ttl {
log.Debugf("Group %s is still less than TTL. SKIP.", *resourceGroup.Name)
log.Infof("Group %s is still less than TTL. SKIP.", *resourceGroup.Name)
return false
}

Expand Down

0 comments on commit 21f0e23

Please sign in to comment.