Skip to content

Commit

Permalink
importer-msgraph-metadata: tidy up log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
manicminer committed Jun 27, 2024
1 parent 5603339 commit f8f7bb6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (p pipelineForService) parseResources(resourceIds parser.ResourceIds, model
// Determine whether to skip a path containing unsupported segment types
for idx, segment := range parsedPath.Segments {
if segment.Type == parser.SegmentCast || segment.Type == parser.SegmentFunction {
p.logger.Info(fmt.Sprintf("skipping path containing %s at position %d for %q: %v", segment.Type, idx, p.service, path))
p.logger.Debug(fmt.Sprintf("Skipping path containing %s at position %d for %q: %v", segment.Type, idx, p.service, path))
skip = true
break
}
Expand All @@ -52,7 +52,7 @@ func (p pipelineForService) parseResources(resourceIds parser.ResourceIds, model
resourceName = *r
}
if resourceName == "" {
p.logger.Warn(fmt.Sprintf("path with unknown name was encountered for %q: %v", p.service, path))
p.logger.Warn(fmt.Sprintf("Path with unknown name was encountered for %q: %v", p.service, path))
continue
}

Expand All @@ -66,7 +66,7 @@ func (p pipelineForService) parseResources(resourceIds parser.ResourceIds, model

if _, ok := resources[resourceName]; !ok {
// Create a new resource if not already encountered
p.logger.Info(fmt.Sprintf("found new resource %q (category %q, service %q, version %q)", resourceName, resourceCategory, p.service, p.apiVersion))
p.logger.Info(fmt.Sprintf("Found new resource %q (category %q, service %q, version %q)", resourceName, resourceCategory, p.service, p.apiVersion))

resources[resourceName] = &parser.Resource{
Name: resourceName,
Expand Down Expand Up @@ -110,7 +110,7 @@ func (p pipelineForService) parseResources(resourceIds parser.ResourceIds, model

if uriSuffix != nil {
if uriSuffixParsed := parser.NewResourceId(*uriSuffix, operationTags); uriSuffixParsed.HasUserValue() {
p.logger.Info(fmt.Sprintf("skipping URI suffix containing user value in resource %q (category %q, service %q, version %q): %q", resourceName, resourceCategory, p.service, p.apiVersion, *uriSuffix))
p.logger.Info(fmt.Sprintf("Skipping URI suffix containing user value in resource %q (category %q, service %q, version %q): %q", resourceName, resourceCategory, p.service, p.apiVersion, *uriSuffix))
continue
}
}
Expand Down Expand Up @@ -196,7 +196,7 @@ func (p pipelineForService) parseResources(resourceIds parser.ResourceIds, model

// Skip unknown operations
if operationType == parser.OperationTypeUnknown {
p.logger.Info(fmt.Sprintf("skipping unknown operation type for %q: %v", p.service, path))
p.logger.Warn(fmt.Sprintf("Skipping unknown operation type for %q: %v", p.service, path))
continue
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func (p pipeline) PersistCommonTypesDefinitions() error {
p.logger.Info("persisting Common Types Definitions..")
p.logger.Info("Persisting Common Types Definitions..")

commonTypes := map[string]sdkModels.CommonTypes{
p.apiVersion: p.commonTypesForVersion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

func (p pipelineForService) persistApiDefinitions(sdkServices map[string]sdkModels.Service, commonTypes map[string]sdkModels.CommonTypes) error {
for serviceName, service := range sdkServices {
p.logger.Info(fmt.Sprintf("persisting API Definitions for Service %q..", serviceName))
p.logger.Info(fmt.Sprintf("Persisting API Definitions for Service %q..", serviceName))

opts := repository.SaveServiceOptions{
CommonTypes: commonTypes,
Expand Down

0 comments on commit f8f7bb6

Please sign in to comment.