Skip to content

Commit fb3d91d

Browse files
Copilotrbtr
andcommitted
Fix CNS logs bytes when printing HNS Endpoint
Co-authored-by: rbtr <[email protected]>
1 parent f1a3d4b commit fb3d91d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cns/hnsclient/hnsclient_windows.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ func configureHostNCApipaEndpoint(
540540

541541
endpoint.IpConfigurations = append(endpoint.IpConfigurations, ipConfiguration)
542542

543-
logger.Printf("[Azure CNS] Configured HostNCApipaEndpoint: %+v", endpoint)
543+
logger.Printf("[Azure CNS] Configured HostNCApipaEndpoint with ID: %s, Name: %s, Network: %s", endpoint.Id, endpoint.Name, endpoint.HostComputeNetwork)
544544

545545
return endpoint, nil
546546
}
@@ -677,10 +677,10 @@ func deleteEndpointByNameHnsV2(
677677
}
678678

679679
if err = endpoint.Delete(); err != nil {
680-
return fmt.Errorf("Failed to delete endpoint: %+v. Error: %v", endpoint, err)
680+
return fmt.Errorf("Failed to delete endpoint: %s (%s). Error: %v", endpoint.Name, endpoint.Id, err)
681681
}
682682

683-
logger.Errorf("[Azure CNS] Successfully deleted endpoint: %+v", endpoint)
683+
logger.Errorf("[Azure CNS] Successfully deleted endpoint with ID: %s, Name: %s", endpoint.Id, endpoint.Name)
684684

685685
return nil
686686
}

0 commit comments

Comments
 (0)