Skip to content

Commit 526c7e7

Browse files
Copilotpjohnst5
andcommitted
Add additional endpoint fields to log statements
Co-authored-by: pjohnst5 <[email protected]>
1 parent fb3d91d commit 526c7e7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

cns/hnsclient/hnsclient_windows.go

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

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

543-
logger.Printf("[Azure CNS] Configured HostNCApipaEndpoint with ID: %s, Name: %s, Network: %s", endpoint.Id, endpoint.Name, endpoint.HostComputeNetwork)
543+
logger.Printf("[Azure CNS] Configured HostNCApipaEndpoint with ID: %s, Name: %s, Network: %s, IpConfigurations:%v, Dns:%v, Routes:%v, MacAddress:%s, Flags:%d",
544+
endpoint.Id, endpoint.Name, endpoint.HostComputeNetwork, endpoint.IpConfigurations, endpoint.Dns, endpoint.Routes, endpoint.MacAddress, endpoint.Flags)
544545

545546
return endpoint, nil
546547
}
@@ -677,10 +678,12 @@ func deleteEndpointByNameHnsV2(
677678
}
678679

679680
if err = endpoint.Delete(); err != nil {
680-
return fmt.Errorf("Failed to delete endpoint: %s (%s). Error: %v", endpoint.Name, endpoint.Id, err)
681+
return fmt.Errorf("Failed to delete endpoint: %s (%s). Error: %v. IpConfigurations:%v, Dns:%v, Routes:%v, MacAddress:%s, Flags:%d",
682+
endpoint.Name, endpoint.Id, err, endpoint.IpConfigurations, endpoint.Dns, endpoint.Routes, endpoint.MacAddress, endpoint.Flags)
681683
}
682684

683-
logger.Errorf("[Azure CNS] Successfully deleted endpoint with ID: %s, Name: %s", endpoint.Id, endpoint.Name)
685+
logger.Errorf("[Azure CNS] Successfully deleted endpoint with ID: %s, Name: %s, IpConfigurations:%v, Dns:%v, Routes:%v, MacAddress:%s, Flags:%d",
686+
endpoint.Id, endpoint.Name, endpoint.IpConfigurations, endpoint.Dns, endpoint.Routes, endpoint.MacAddress, endpoint.Flags)
684687

685688
return nil
686689
}

cns/service/service

65.2 MB
Binary file not shown.

0 commit comments

Comments
 (0)