Closed rjarun8 closed 1 year ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Please accept Google's CLA in order to proceed.
Please accept Google's CLA in order to proceed.
Accepted
Just noticed activity in this PR, sorry for not replying later. Like I mentioned in the comment, I left it to be print
and not logging.info on purpose. Otherwise GCP Scanner is completely silent and user has 0 idea of what's going on and whether it is working at all. We either need to have another level of verbosity that's printing some basic level of information in terminal or just leave as it is now with print
.
Why can't we set the default level to info and use logging?
In this case, it generates too much info and terminal is overloaded with text...
On Mon, Jul 17, 2023, 11:41 AM Calle Svensson @.***> wrote:
Why can't we set the default level to info and use logging?
— Reply to this email directly, view it on GitHub https://github.com/google/gcp_scanner/pull/235#issuecomment-1638678948, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUFDYWSN25GLQ3FBSMK4I3XQWBO3ANCNFSM6AAAAAAZ2YTA6E . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Doesn't that suggest that we should shift a lot of the info messages to debug messages?
I'd just use several levels of verbosity as it is usually done in scanners. Debug could be part of that (e.g. last level).
On Mon, Jul 17, 2023, 12:36 PM Calle Svensson @.***> wrote:
Doesn't that suggest that we should shift a lot of the info messages to debug messages?
— Reply to this email directly, view it on GitHub https://github.com/google/gcp_scanner/pull/235#issuecomment-1638754406, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUFDYXHLZNBD4LTNIUUIQ3XQWH4JANCNFSM6AAAAAAZ2YTA6E . You are receiving this because you commented.Message ID: @.***>
I am closing this one due to inactivity. TL;DR: we need a logging system with multiple levels of verbosity.
Description
I have replaced the
print()
function with thelogging.info()
function in thescanner.py
file. This change allows the program to output log messages with timestamps, which is useful for tracking the progress of long-running scans.Changes Made
print()
function withlogging.info()
inscanner.py
.Checklist
Related Issues
Additional Notes
This change should make it easier to track the progress of long-running scans. The log messages now include a timestamp, which can be helpful for understanding when each event occurred. I have not added any new tests or updated the documentation, as I believe these changes are self-explanatory and do not significantly alter the functionality of the program.