我实现了一个最小的 Quarkus RestClient,就像文档中的示例(https://quarkus.io/guides/rest-client):
package org.acme.rest.client;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
import org.jboss.resteasy.annotations.jaxrs.PathParam;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import java.util.Set;
@Path("/v2")
@RegisterRestClient
public interface CountriesService {
@GET
@Path("/name/{name}")
Set<Country> getByName(@PathParam String name);
}
如何为上面对客户端的所有调用启用日志记录?
我需要显示完整的 URI、查询参数和 HTTP 响应代码,即使后者显示在单独的行上。