Skip to content

Commit 5169cb0

Browse files
Copilotpjohnst5
andcommitted
Fix linting errors in HNS Endpoint logging
Co-authored-by: pjohnst5 <[email protected]>
1 parent c32bbd0 commit 5169cb0

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

cns/hnsclient/hnsclient_windows.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,10 @@ 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, 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)
543+
logger.Printf("[Azure CNS] Configured HostNCApipaEndpoint with ID: %s, Name: %s, Network: %s",
544+
endpoint.Id, endpoint.Name, endpoint.HostComputeNetwork)
545+
logger.Printf("[Azure CNS] Endpoint IpConfigurations:%v, Dns:%v, Routes:%v, MacAddress:%s, Flags:%d",
546+
endpoint.IpConfigurations, endpoint.Dns, endpoint.Routes, endpoint.MacAddress, endpoint.Flags)
545547

546548
return endpoint, nil
547549
}
@@ -678,12 +680,14 @@ func deleteEndpointByNameHnsV2(
678680
}
679681

680682
if err = endpoint.Delete(); err != nil {
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)
683+
return fmt.Errorf("Failed to delete endpoint: %s (%s). Error: %v",
684+
endpoint.Name, endpoint.Id, err)
683685
}
684686

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)
687+
logger.Errorf("[Azure CNS] Successfully deleted endpoint with ID: %s, Name: %s",
688+
endpoint.Id, endpoint.Name)
689+
logger.Debugf("[Azure CNS] Endpoint details - IpConfigurations:%v, Dns:%v, Routes:%v, MacAddress:%s, Flags:%d",
690+
endpoint.IpConfigurations, endpoint.Dns, endpoint.Routes, endpoint.MacAddress, endpoint.Flags)
687691

688692
return nil
689693
}

0 commit comments

Comments
 (0)