log
The log feature logs request and response messages to the log4j framework. The messages will appear either on the console or in a log file depending on the configuration of the conf/log4j.properties file.
Can be used in
proxy, serviceProxy, soapProxy, transport
Syntax
<log headerOnly="[false,true]" category="[string]" level="[TRACE,DEBUG,INFO,WARN,ERROR,FATAL]"/>
Listing 1: log Syntax
Sample
<serviceProxy port="2000"> <request> <log /> </request> <target host="www.predic8.de" /> </serviceProxy>
Listing 2: log Example
Attributes
Name | Mandatory | Default | Description | Example |
---|---|---|---|---|
category | no | com.predic8.membrane.core.interceptor.LogInterceptor | Sets the category of the logged message. | Membrane |
headerOnly | no | false | If set to true only the HTTP header will be logged. | true |
level | no | INFO | Sets the log level. | WARN |
Flow
This interceptor is by default applied to both requests and responses. By wrapping it in an <request>...</request> (or <response>...</response>) element, you can select to apply it only to requests (or only to responses). See request and response.