-
Notifications
You must be signed in to change notification settings - Fork 0
Pratham add logs #12
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
base: cloudanix
Are you sure you want to change the base?
Pratham add logs #12
Conversation
ganeshjagdale9545
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one minor change needed
cloudtracker/cli.py
Outdated
| cloudtrail_log_paths[log_level]["bucket"] = logging_account["bucketName"] | ||
| except (s3.exceptions.NoSuchKey, s3.exceptions.NoSuchBucket, botocore.exceptions.ClientError) as e: | ||
| continue | ||
| if cloudtrail_log_paths[log_level].get("boto3_session"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this if else condition. if its fail to create session it will throw an error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces detailed logging throughout CloudTracker by adding a new logger parameter (cdx_logger) in multiple modules, replacing direct logging calls with consistent cdx_logger invocations.
- Added detailed logging to the ElasticSearch, Athena, and CLI modules.
- Updated function signatures in init.py to pass and use the new cdx_logger for consistent logging across the codebase.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cloudtracker/datasources/es.py | Updated init signature and logger usage. |
| cloudtracker/datasources/athena.py | Replaced logging calls with cdx_logger and expanded logging in query flows. |
| cloudtracker/cli.py | Modified main() to receive cdx_logger and updated logging calls. |
| cloudtracker/init.py | Updated helper functions to accept cdx_logger and adjust logging calls. |
Comments suppressed due to low confidence (1)
cloudtracker/cli.py:142
- [nitpick] Concatenating principal ARNs into a string using string addition may become hard to maintain as the logic grows; consider using a list to collect ARNs and then joining them with a suitable separator for improved clarity and potential reuse.
principals_arn = ""
|
@pmalu9211 can you please resolve this comments? |
ganeshjagdale9545
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
@pmalu9211 can you please make changes in cloud-iam-entitlements project?
LINK TO CARD