Skip to content

Commit

Permalink
add logger
Browse files Browse the repository at this point in the history
  • Loading branch information
dgghinea committed Aug 9, 2024
1 parent 8744ee8 commit ba305a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/apic/servicebody.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package apic
import (
management "github.com/Axway/agent-sdk/pkg/apic/apiserver/models/management/v1alpha1"
"github.com/Axway/agent-sdk/pkg/apic/provisioning"
"github.com/Axway/agent-sdk/pkg/util/log"
)

// APIKeyInfo -
Expand Down Expand Up @@ -64,6 +65,7 @@ type ServiceBody struct {
isDesignDataplane bool
referencedServiceName string
referencedInstanceName string
logger log.FieldLogger
}

// SetAccessRequestDefinitionName - set the name of the access request definition for this service body
Expand Down Expand Up @@ -118,6 +120,7 @@ func (s *ServiceBody) GetAccessRequestDefinition() *management.AccessRequestDefi

func (s *ServiceBody) createAccessRequestDefinition() error {
if !s.uniqueARD {
s.logger.WithField("ardName", s.ardName).Debug("skipping registering new ARD")
return nil
}
oauthScopes := make([]string, 0)
Expand Down
2 changes: 2 additions & 0 deletions pkg/apic/servicebuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/Axway/agent-sdk/pkg/apic/provisioning"
"github.com/Axway/agent-sdk/pkg/config"
"github.com/Axway/agent-sdk/pkg/util/log"
)

const (
Expand Down Expand Up @@ -97,6 +98,7 @@ func NewServiceBodyBuilder() ServiceBuilder {
InstanceAgentDetails: make(map[string]interface{}),
RevisionAgentDetails: make(map[string]interface{}),
requestDefinitionsAllowed: true,
logger: log.NewFieldLogger().WithPackage("sdk.apic").WithComponent("serviceBuilder"),
},
}
}
Expand Down

0 comments on commit ba305a7

Please sign in to comment.