-
Notifications
You must be signed in to change notification settings - Fork 949
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
base: master
Are you sure you want to change the base?
Conversation
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.
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 |
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.
This comment is redundant, people who do not see this PR will be confused by the term original code and should be deleted.
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.
i deleted it already
static Interceptor loggingInterceptor() { | ||
final Logger slf4jLogger = LoggerFactory.getLogger("com.linecorp.bot.client.wire"); | ||
return new HttpLoggingInterceptor(slf4jLogger::info) | ||
.setLevel(HttpLoggingInterceptor.Level.BODY); |
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.
[Q] Why is code similar to ApiClientBuilder's buildLoggingInterceptor() needed here?
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.
nice catch @mokuzon , it is duplicated!
I removed it
An implementation for this discussion #1415