google / gcp_scanner

A comprehensive scanner for Google Cloud
Apache License 2.0
311 stars 97 forks source link

Use standardised log output with timestamp for all output #143

Open ZetaTwo opened 1 year ago

ZetaTwo commented 1 year ago

Currently when running a scan, the program outputs lines on the form "Inspecting project [project id]" while for example errors use a full logging mechanism which includes a timestamp. This is annoying if you have a long running scan and you want to know how it is progressing along and when the last message was logged. Since all the actual results of the scan is saved in a separate structured format, I would propose that all other output should be considered logging and use the proper logging facilities.

natea123 commented 1 year ago

Hi @ZetaTwo would you be able to elaborate on "use the proper logging facilities"?

For example would the following structure be sufficient: "2023-06-19 13:00:08 Inspecting project [project id1]" "2023-06-19 13:04:28 Inspecting project [project id2]"

ZetaTwo commented 1 year ago

I mean that we should use the logging library instead of just print().