Skip to content
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

Add anchor peer enhancement: Using SDK #126

Merged
merged 3 commits into from
Jan 23, 2024

Conversation

nidhi-singh02
Copy link
Contributor

No description provided.

@nidhi-singh02 nidhi-singh02 requested a review from a team as a code owner January 22, 2024 11:05
@nidhi-singh02 nidhi-singh02 marked this pull request as draft January 22, 2024 11:19
@nidhi-singh02 nidhi-singh02 marked this pull request as ready for review January 22, 2024 16:22
log.warn(
"Network, User and MSP details cannot be NULL: "
+ "Network = "
+ network
Copy link
Contributor

@nithin-pankaj nithin-pankaj Jan 22, 2024

Choose a reason for hiding this comment

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

Aren't these null? Would it help if we concatenate null to log messages?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not all of these (network, user and msp details) would be null at the same time. The intention is if any of these are null and others are not null, the log messages will help us in knowing which value is not present, which would help us in debugging.

ErrorCode.HYPERLEDGER_FABRIC_CONNECTION_ERROR,
"Error while establishing connection to the gateway",
} catch (Exception e) {
log.warn("Error while channel configuration update : " + e.getMessage());
Copy link
Contributor

Choose a reason for hiding this comment

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

Use standard log4j formatting instead of concatenating ythe string.
For eg: This should be written as log.warn("Error while channel configuration update with error message : {}", e.getMessage);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I see string concatenation being used at other places as well, I have changed it to log4j formatting in the files where this PR changes are present. We can pick up refactoring to ensure logging format is consistent throughout the data connector, currently it is mixed.

@nidhi-singh02 nidhi-singh02 merged commit d78c425 into hyperledger-labs:main Jan 23, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants