Skip to content

Commit bfec6b1

Browse files
parser: quiet down normal logs
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
1 parent 9aa4021 commit bfec6b1

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

pkg/parser/extract.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func CollectKinds(ctx *genall.GenerationContext, verbs ...string) (map[Group]map
5050
groupVersionKinds := map[Group]map[types.PackageVersion][]Kind{}
5151
for _, root := range ctx.Roots {
5252
logger := klog.Background()
53-
logger.Info("processing " + root.PkgPath)
53+
logger.V(4).Info("processing " + root.PkgPath)
5454
parts := strings.Split(root.PkgPath, "/")
5555
groupName := types.Group(parts[len(parts)-2])
5656
version := types.PackageVersion{
@@ -69,7 +69,7 @@ func CollectKinds(ctx *genall.GenerationContext, verbs ...string) (map[Group]map
6969
// "// +groupName=somegroup.foo.bar.io", use the first field (somegroup) as the name of the
7070
// group when generating. [N.B.](skuznets): even though the generators do the indexing here, the group
7171
// type does it for you, and handles the special case for "internal"
72-
logger.WithValues("original", groupName, "override", string(groupNameRaw)).Info("found a group name override")
72+
logger.WithValues("original", groupName, "override", string(groupNameRaw)).V(4).Info("found a group name override")
7373
groupName = types.Group(groupNameRaw)
7474
}
7575
groupGoName := namer.IC(groupName.PackageName())
@@ -88,18 +88,18 @@ func CollectKinds(ctx *genall.GenerationContext, verbs ...string) (map[Group]map
8888

8989
logger = logger.WithValues("group", group, "version", version, "goName", groupGoName)
9090
if isForbiddenGroupVersion(group.Group, version.Version) {
91-
logger.WithValues("package", root.PkgPath).Info("skipping forbidden package")
91+
logger.WithValues("package", root.PkgPath).V(4).Info("skipping forbidden package")
9292
continue
9393
}
94-
logger.WithValues("package", root.PkgPath).Info("collecting kinds in package")
94+
logger.WithValues("package", root.PkgPath).V(4).Info("collecting kinds in package")
9595

9696
// find types which have generated clients and support LIST + WATCH
9797
var kinds []Kind
9898
var typeErrors []error
9999
if err := markers.EachType(ctx.Collector, root, func(info *markers.TypeInfo) {
100100
logger = logger.WithValues("kind", info.Name)
101101
if !ClientsGeneratedForType(info) {
102-
logger.V(3).Info("skipping kind as it has no generated clients")
102+
logger.V(3).V(4).Info("skipping kind as it has no generated clients")
103103
return
104104
}
105105

@@ -110,11 +110,11 @@ func CollectKinds(ctx *genall.GenerationContext, verbs ...string) (map[Group]map
110110
}
111111
extensions := ClientExtensions(info)
112112
if len(verbs) > 0 && !supported.HasAll(verbs...) {
113-
logger.Info("skipping kind as it does not support the necessary verbs")
113+
logger.V(4).Info("skipping kind as it does not support the necessary verbs")
114114
return
115115
}
116116

117-
logger.Info("will generate for kind")
117+
logger.V(4).Info("will generate for kind")
118118
kinds = append(kinds, NewKind(info.Name, IsNamespaced(info), supported, extensions))
119119
}); err != nil {
120120
return nil, err
@@ -123,7 +123,7 @@ func CollectKinds(ctx *genall.GenerationContext, verbs ...string) (map[Group]map
123123
return nil, errors.NewAggregate(typeErrors)
124124
}
125125
if len(kinds) == 0 {
126-
logger.Info("skipping group/version as it has no kinds that have generated clients")
126+
logger.V(4).Info("skipping group/version as it has no kinds that have generated clients")
127127
continue
128128
}
129129
if _, recorded := groupVersionKinds[group]; !recorded {

0 commit comments

Comments
 (0)