Repetitive logging we need to print out for all resources. We should be able to refactor so there's a single place to log things like this:
if len(identifiers) == 0 {
logging.Debugf("No API Gateways (v1) to nuke in region %s", gateway.Region)
}
if len(identifiers) > 100 {
logging.Errorf("Nuking too many API Gateways (v1) at once (100): " +
"halting to avoid hitting AWS API rate limiting")
return TooManyApiGatewayErr{}
}
consistent message format for users experience & readability:
having consistent prefix.
logging.Debugf("["+
"OK] API Gateway (v1) %s deleted in %s", aws.StringValue(apigwID), gateway.Region)
logging.Debugf(
"[Failed] Error deleting API Gateway (v1) %s in %s", aws.StringValue(apigwID), gateway.Region)
There's several places where we can improve logging across resources. This could be additional work on top of issue like this:
Here are some suggestions:
consistent message format for users experience & readability: