It is a bit more than the two lines as you also have to add the feature to
your client. What API do you use to create the client?

The LoggingFeature by default logs to slf4j. So the easiest way to get
output on the console is to use a logging backend like log4j and configure
it to log to the console. You can also selectively configure to only log
the requests and responses by limiting the settings to a logger name.

Another way is to implement your own LogEventSender and set it on the
LoggingFeature. This is pretty simple to do and gives you full access on
all logged data.

https://github.com/apache/cxf/blob/master/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/slf4j/Slf4jEventSender.java

Christian


2018-02-06 6:48 GMT+01:00 Al Grant <bigal...@gmail.com>:

> Thanks.
>
> Do you actually mean to instantiate it:
>
>         LoggingFeature logging = new LoggingFeature();
>         logging.setPrettyLogging(true);
>
> The github example is a Server - I want to do it in a client and print to
> log4j and console?
>
> So after the above two lines how do I write to console request and
> response?
>
> Cheers
>
> AG
>
>
>
>
> --
> Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

Reply via email to