goaws icon indicating copy to clipboard operation
goaws copied to clipboard

Log level fine-tuning

Open rokf opened this issue 4 years ago • 3 comments

Hey, I propose that some kind of log level configuration logic is added to at least the gosqs part of the application.

There are two logs that are especially bothering me:

https://github.com/p4tin/goaws/blob/6ecd9bf473ad2b2a88dba5224957826665710dec/app/gosqs/gosqs.go#L401

https://github.com/p4tin/goaws/blob/6ecd9bf473ad2b2a88dba5224957826665710dec/app/gosqs/gosqs.go#L451

As the SQS instance is waiting for messages it is spamming out useless logs every second. This can be costly in certain deployment scenarios.

How about introducing an error log level?

I've also noticed that the flag configuration logic in https://github.com/p4tin/goaws/blob/7aca39ed52f1b6b5ad83767a5dd6dc320fea8c8d/app/cmd/goaws.go#L22 is mentioning that the warning level is the default log level, however that is not true - it's the info level.

rokf avatar Oct 16 '20 08:10 rokf

Good point rokf no reason to print anything at this point. We can make these debug level logs, and clean up the help logic.

Admiral-Piett avatar Oct 12 '23 21:10 Admiral-Piett