The @Logging
annotation is defined by the
org.apache.cxf.annotations.Logging
interface. It is placed on the SEI.
This annotation enables logging for all endpoints associated with the SEI. Table 1.12 shows the optional properties you can set in this annotation.
Table 1.12. @Logging Properties
Property | Description |
---|---|
limit | Specifies the size limit, beyond which the message is truncated in the logs. Default is 64K. |
inLocation | Specifies the location to log incoming messages. Can be either
<stderr> , <stdout> , <logger> , or a
filename. Default is <logger> . |
outLocation | Specifies the location to log outgoing messages. Can be either
<stderr> , <stdout> , <logger> , or a
filename. Default is <logger> . |
Example 1.15 shows how to enable logging for the
HelloWorld
SEI, where incoming messages are sent to
<stdout>
and outgoing messages are sent to <logger>
.
Example 1.15. Logging configuration using annotations
@WebService @Logging(limit=16000, inLocation="<stdout>") public interface HelloWorld { String sayHi(@WebParam(name = "text") String text); }