forestwanglin / okx-v5-java

OKX V5 SDK for JAVA
MIT License
19 stars 7 forks source link

Messages should not be logged at `info` level #4

Closed jouzitong closed 5 months ago

jouzitong commented 5 months ago

I don't think you should do info level logging of messages. I suggest changing it to debug or trace.

public class AuthenticationInterceptor implements Interceptor {

    @NotNull
    @Override
    public Response intercept(@NotNull Chain chain) throws IOException {
        String timestamp = DateUtils.format(DateUtils.FORMAT_UTC_ISO8601, new Date(), 0);
        String method = chain.request().method();
        String body = EMPTY;
        if (method.equalsIgnoreCase("POST")) {
            body = bodyToString(chain.request().body());
        }
        log.info("body {}", body);
       // .....
     } 

During my actual development process, I generated too many logs like this, which are worthless.

forestwanglin commented 5 months ago

Thanks for your advice. I agree with you. L've removed it. You can create pull request if you do any improvement.