Skip to content

Commit

Permalink
Merge pull request #2842 from ncdc/no-direct-klog
Browse files Browse the repository at this point in the history
🌱 Remove direct klog usage
  • Loading branch information
openshift-merge-robot authored Feb 22, 2023
2 parents 6434142 + e544558 commit 771cfc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion hack/logcheck.out
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
/pkg/reconciler/cache/labelclusterroles/labelclusterrole_controller.go:148:3: function "Errorf" should not be used, convert to contextual logging
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ type controller struct {
func (c *controller) EnqueueClusterRoles(values ...interface{}) {
clusterRoles, err := c.clusterRoleLister.List(labels.Everything())
if err != nil {
klog.Errorf("Error listing ClusterRoles: %v", err)
logger := logging.WithReconciler(klog.Background(), c.controllerName)
logger.Error(err, "error listing ClusterRoles")
return
}
for _, cr := range clusterRoles {
Expand Down

0 comments on commit 771cfc8

Please sign in to comment.