Skip to content

Remove default logging in the Data Loader DAO #2708

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thongdk8
Copy link
Contributor

Description

Currently, the data loader logs every operation related to DAO operations by default, which is not user-friendly, especially when importing data every get, put is printed to the console. So we should remove this default behavior and add a proper verbose option later in another PR. PTAL. Thank you.

Related issues and/or PRs

NA

Changes made

  • Remove default logging in the Data Loader DAO

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • I have considered whether similar issues could occur in other products, components, or modules if this PR is for bug fixes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • Tests (unit, integration, etc.) have been added for the changes.
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

NA

Release notes

NA

@thongdk8 thongdk8 requested a review from Copilot May 28, 2025 08:26
Copy link

@Copilot Copilot AI left a 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 pull request removes default logging for DAO operations to prevent excessive console output during data imports. The changes include:

  • Removal of logger imports and logger instance
  • Deletion of log messages after GET and PUT operations in storage and transaction modes
  • Removal of log messages from SCAN operations

@thongdk8 thongdk8 self-assigned this May 28, 2025
@thongdk8 thongdk8 changed the title Remove default logging the Data Loader DAO Remove default logging in the Data Loader DAO May 28, 2025
@thongdk8 thongdk8 requested a review from inv-jishnu May 28, 2025 08:30
Copy link
Collaborator

@brfrn169 brfrn169 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

Copy link
Contributor

@inv-jishnu inv-jishnu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thank you.

Copy link
Contributor

@ypeckstadt ypeckstadt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you.

@@ -59,9 +50,7 @@ public Optional<Result> get(

try {
Get get = createGetWith(namespace, table, partitionKey, clusteringKey);
Optional<Result> result = storage.get(get);
logger.info(String.format(GET_COMPLETED_MSG, loggingKey));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is another option to change the log level to DEBUG or TRACE. What do you think?

Copy link
Contributor Author

@thongdk8 thongdk8 May 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will add some verbose options later in the command args, also with some progress printing to the console I think. So we're gonna add the logger back if needed. WDYT? cc @ypeckstadt

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good 👍

@thongdk8 thongdk8 requested a review from komamitsu May 29, 2025 06:37
Copy link
Contributor

@komamitsu komamitsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants