cloudwash icon indicating copy to clipboard operation
cloudwash copied to clipboard

Cloudwash needs more detailed logging.

Open mayurilahane opened this issue 2 years ago • 3 comments

Hi, I have been using Cloudwash for couple of months. And till now I have observed that it needs a detailed logging structure. because as I was writing the Tekton pipeline for cleanup of Azure, AWS and GCP it always showed me this line at first and then it went on with the actual error.

(app-root) bash-5.2$ swach -d azure --all
<<<<<<< Running the cleanup script in DRY RUN mode >>>>>>>
The AZURE providers settings are initialized and validated !

and even if it wasn't able to fetch the secrets still it was saying "The AZURE providers settings are initialized and validated !" which i think is confusing.

So, now that I am testing my cron job locally with the help of minikube kubectl and everything is setup, resolved all of the error, but now it just gives me above pasted LOC. and not the expected deletable resources.

So, I expect it to show me the full log. Thanks !

mayurilahane avatar Nov 13 '23 16:11 mayurilahane

cc: @mshriver

mayurilahane avatar Nov 13 '23 16:11 mayurilahane

Looks like some overlap with the intent of #4, though I think its good for this to focus on the logging approach in general.

The types of improvements I would like to see include:

  • More debug level logging statements during provider query and resource filtering
  • log level control from the CLI
  • log level control via envvar (nice to have)
  • Removal of "settings validated" message, replace with confirmation of authenticated connection

mshriver avatar Nov 14 '23 01:11 mshriver

@mayurilahane @mshriver After debugging, looks like the regions setting value was not been seeded well to the tool. I agree though that the tool should have inform the same about this situation and inform that regions are must to proceed.

@mayurilahane You can contribute to log is the regions are missing either through info or through settings validation.

jyejare avatar Nov 29 '23 07:11 jyejare