Logging in CXF and RestEasy clients

限于喜欢 提交于 2019-12-11 03:17:11

问题


this week I was trying Jersey, CXF and RestEasy clients (using JSON) as a standalone application(testing purposes), and I notice something. In Jersey I can enable logs with one line of code:

Client client = Client.create();
client.addFilter(new LoggingFilter(System.out));
WebResource webResource = client.resource("http://localhost:8080/IT1/MB1");
....
String output = response.getEntity(String.class);
....

Using the LoggingFilter, I get interesting information about the request and/or response in the console as logs. I find a much a way to do the same on CXF and resteasy, but I only get configurations for log4J and another frameworks, but I can't get that working on an standalone application. ¿Is there a way to do this?

来源:https://stackoverflow.com/questions/19168469/logging-in-cxf-and-resteasy-clients

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!