@@ -17,7 +17,6 @@ import (
1717 "github.com/Azure/azure-container-networking/cns/logger"
1818 acn "github.com/Azure/azure-container-networking/common"
1919 "github.com/Azure/azure-container-networking/keyvault"
20- "github.com/Azure/azure-container-networking/log"
2120 localtls "github.com/Azure/azure-container-networking/server/tls"
2221 "github.com/Azure/azure-container-networking/store"
2322 "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
@@ -112,7 +111,7 @@ func (service *Service) AddListener(config *common.ServiceConfig) error {
112111 // Start the listener and HTTP and HTTPS server.
113112 tlsConfig , err := getTLSConfig (config .TLSSettings , config .ErrChan ) //nolint
114113 if err != nil {
115- log .Printf ("Failed to compose Tls Configuration with error: %+v" , err )
114+ logger .Printf ("Failed to compose Tls Configuration with error: %+v" , err )
116115 return errors .Wrap (err , "could not get tls config" )
117116 }
118117
@@ -122,14 +121,14 @@ func (service *Service) AddListener(config *common.ServiceConfig) error {
122121 }
123122
124123 service .Listener = nodeListener
125- log .Debugf ("[Azure CNS] Successfully initialized a service with config: %+v" , config )
124+ logger .Debugf ("[Azure CNS] Successfully initialized a service with config: %+v" , config )
126125
127126 return nil
128127}
129128
130129// Initialize initializes the service and starts the listener.
131130func (service * Service ) Initialize (config * common.ServiceConfig ) error {
132- log .Debugf ("[Azure CNS] Going to initialize a service with config: %+v" , config )
131+ logger .Debugf ("[Azure CNS] Going to initialize a service with config: %+v" , config )
133132
134133 // Initialize the base service.
135134 if err := service .Service .Initialize (config ); err != nil {
@@ -281,11 +280,11 @@ func mtlsRootCAsFromCertificate(tlsCert *tls.Certificate) (*x509.CertPool, error
281280}
282281
283282func (service * Service ) StartListener (config * common.ServiceConfig ) error {
284- log .Debugf ("[Azure CNS] Going to start listener: %+v" , config )
283+ logger .Debugf ("[Azure CNS] Going to start listener: %+v" , config )
285284
286285 // Initialize the listener.
287286 if service .Listener != nil {
288- log .Debugf ("[Azure CNS] Starting listener: %+v" , config )
287+ logger .Debugf ("[Azure CNS] Starting listener: %+v" , config )
289288 // Start the listener.
290289 // continue to listen on the normal endpoint for http traffic, this will be supported
291290 // for sometime until partners migrate fully to https
@@ -315,5 +314,5 @@ func (service *Service) ParseOptions(options OptionMap) OptionMap {
315314func (service * Service ) SendErrorResponse (w http.ResponseWriter , errMsg error ) {
316315 resp := errorResponse {errMsg .Error ()}
317316 err := acn .Encode (w , & resp )
318- log .Errorf ("[%s] %+v %s." , service .Name , & resp , err .Error ())
317+ logger .Errorf ("[%s] %+v %s." , service .Name , & resp , err .Error ())
319318}
0 commit comments