Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent Logging Messages Across Resources #692

Open
hongil0316 opened this issue May 3, 2024 · 0 comments
Open

Consistent Logging Messages Across Resources #692

hongil0316 opened this issue May 3, 2024 · 0 comments
Assignees

Comments

@hongil0316
Copy link
Contributor

hongil0316 commented May 3, 2024

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:

  • 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)
@hongil0316 hongil0316 self-assigned this May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant