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

Allow user pick their own logger with custom config instead #1455

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

Conversation

trinhnx
Copy link

@trinhnx trinhnx commented Oct 24, 2024

An implementation for this discussion #1415

@CLAassistant
Copy link

CLAassistant commented Oct 24, 2024

CLA assistant check
All committers have signed the CLA.

@Yang-33 Yang-33 requested a review from mokuzon November 6, 2024 13:16
Copy link
Contributor

@mokuzon mokuzon left a comment

Choose a reason for hiding this comment

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

Thanks for contributing!!! & sorry for the very late review.

@@ -97,6 +97,8 @@ public ApiClientBuilder(URI apiEndPoint, Class<T> clientClass, ExceptionBuilder

private Integer maxRequestsPerHost = 5;

private boolean usingDefaultLogger = true; // Just kept the same behavior as the original code
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is redundant, people who do not see this PR will be confused by the term original code and should be deleted.

Copy link
Author

Choose a reason for hiding this comment

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

i deleted it already

Comment on lines 30 to 33
static Interceptor loggingInterceptor() {
final Logger slf4jLogger = LoggerFactory.getLogger("com.linecorp.bot.client.wire");
return new HttpLoggingInterceptor(slf4jLogger::info)
.setLevel(HttpLoggingInterceptor.Level.BODY);
Copy link
Contributor

Choose a reason for hiding this comment

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

[Q] Why is code similar to ApiClientBuilder's buildLoggingInterceptor() needed here?

Copy link
Author

Choose a reason for hiding this comment

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

nice catch @mokuzon , it is duplicated!
I removed it

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