Skip to content

Commit

Permalink
Fix panic due to logging issue
Browse files Browse the repository at this point in the history
We're seeing a panic in the log when parsing profiles on managed
offerings:

  "msg":"odd number of arguments passed as key-value pairs for logging","ignored key"

This is likely related to ComplianceAsCode#518

This commit updates the log to use a key-value pair so that the panic
goes away.
  • Loading branch information
rhmdnd committed May 22, 2024
1 parent 2a63fdf commit 191c320
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/profileparser/profileparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func parseProfileFromNode(profileRoot *xmlquery.Node, pb *cmpv1alpha1.ProfileBun
productType, productName := getProductTypeAndName(profileObj, defType, defName)

if productType == "Platform" && utils.GetPlatform() == "ROSA" {
log.Info("Skipping platform profile creation because it is not supported on this platform", xccdf.GetProfileNameFromID(id))
log.Info("Skipping platform profile creation because it is not supported on this platform", "id", xccdf.GetProfileNameFromID(id))
continue
}
log.Info("Platform info", "type", productType, "name", productName)
Expand Down

0 comments on commit 191c320

Please sign in to comment.