Skip to content

Commit 47fe677

Browse files
committed
Make Debug Info ...
1 parent 92e1910 commit 47fe677

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

pkg/clients/tagging/v1/client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func (c client) GetResources(ctx context.Context, job model.DiscoveryJob, region
124124
if resource.FilterThroughTags(job.SearchTags) {
125125
resources = append(resources, &resource)
126126
} else {
127-
c.logger.Debug("Skipping resource because search tags do not match", "arn", resource.ARN)
127+
c.logger.Info("Skipping resource because search tags do not match", "arn", resource.ARN)
128128
}
129129
}
130130
return !lastPage
@@ -133,7 +133,7 @@ func (c client) GetResources(ctx context.Context, job model.DiscoveryJob, region
133133
return nil, err
134134
}
135135

136-
c.logger.Debug("GetResourcesPages finished", "total", len(resources))
136+
c.logger.Info("GetResourcesPages finished", "total", len(resources))
137137
}
138138

139139
if ext, ok := ServiceFilters[svc.Namespace]; ok {
@@ -144,7 +144,7 @@ func (c client) GetResources(ctx context.Context, job model.DiscoveryJob, region
144144
return nil, fmt.Errorf("failed to apply ResourceFunc for %s, %w", svc.Namespace, err)
145145
}
146146
resources = append(resources, newResources...)
147-
c.logger.Debug("ResourceFunc finished", "total", len(resources))
147+
c.logger.Info("ResourceFunc finished", "total", len(resources))
148148
}
149149

150150
if ext.FilterFunc != nil {
@@ -153,7 +153,7 @@ func (c client) GetResources(ctx context.Context, job model.DiscoveryJob, region
153153
return nil, fmt.Errorf("failed to apply FilterFunc for %s, %w", svc.Namespace, err)
154154
}
155155
resources = filteredResources
156-
c.logger.Debug("FilterFunc finished", "total", len(resources))
156+
c.logger.Info("FilterFunc finished", "total", len(resources))
157157
}
158158
}
159159

pkg/clients/tagging/v2/client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ func (c client) GetResources(ctx context.Context, job model.DiscoveryJob, region
131131
if resource.FilterThroughTags(job.SearchTags) {
132132
resources = append(resources, &resource)
133133
} else {
134-
c.logger.Debug("Skipping resource because search tags do not match", "arn", resource.ARN)
134+
c.logger.Info("Skipping resource because search tags do not match", "arn", resource.ARN)
135135
}
136136
}
137137
}
138138

139-
c.logger.Debug("GetResourcesPages finished", "total", len(resources))
139+
c.logger.Info("GetResourcesPages finished", "total", len(resources))
140140
}
141141

142142
if ext, ok := ServiceFilters[svc.Namespace]; ok {
@@ -147,7 +147,7 @@ func (c client) GetResources(ctx context.Context, job model.DiscoveryJob, region
147147
return nil, fmt.Errorf("failed to apply ResourceFunc for %s, %w", svc.Namespace, err)
148148
}
149149
resources = append(resources, newResources...)
150-
c.logger.Debug("ResourceFunc finished", "total", len(resources))
150+
c.logger.Info("ResourceFunc finished", "total", len(resources))
151151
}
152152

153153
if ext.FilterFunc != nil {
@@ -156,7 +156,7 @@ func (c client) GetResources(ctx context.Context, job model.DiscoveryJob, region
156156
return nil, fmt.Errorf("failed to apply FilterFunc for %s, %w", svc.Namespace, err)
157157
}
158158
resources = filteredResources
159-
c.logger.Debug("FilterFunc finished", "total", len(resources))
159+
c.logger.Info("FilterFunc finished", "total", len(resources))
160160
}
161161
}
162162

pkg/job/discovery.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ func runDiscoveryJob(
4646
) ([]*model.TaggedResource, []*model.CloudwatchData) {
4747
logger.Debug("Get tagged resources")
4848

49+
logger.Info("START - Get tagged resources")
4950
resources, err := clientTag.GetResources(ctx, job, region)
51+
logger.Info("STOP - Get tagged resources")
5052
if err != nil {
5153
if errors.Is(err, tagging.ErrExpectedToFindResources) {
5254
logger.Error("No tagged resources made it through filtering", "err", err)

0 commit comments

Comments
 (0)