Typical use cases:
- Debugging APIs during development.
- Operational visibility in production (metadata-only, masked values, message, body).
MEMBRANE_DISABLE_TERM_COLORS to true or false.Syntax
log:
'$ref': <string>
body: <boolean>
category: <string>
label: <string>
language: groovy
level: trace
maskSensitive: <boolean>
message: <string>
xmlConfig: {}
log:
'$ref': <string>
body: <boolean>
category: <string>
label: <string>
language: groovy
level: trace
maskSensitive: <boolean>
message: <string>
xmlConfig: {}
Sample
<serviceProxy port="2000">
<request>
<log />
</request>
<target host="www.predic8.de" />
</serviceProxy><serviceProxy port="2000"> <request> <log /> </request> <target host="www.predic8.de" /> </serviceProxy>
Attributes
| Name | Required | Default | Description | Examples |
|---|---|---|---|---|
| $ref | false | - | Reference a component defined under components. | - |
| body | false | true | Whether to include message bodies in logs. Warning: Body logging can expose secrets or personal data. Prefer | - |
| category | false | Fully qualified class name of LogInterceptor com.predic8.membrane.core.interceptor.log.LogInterceptor | Logger category to use. Allows routing logs into different appenders/targets via Logback/Log4j configuration. | - |
| label | false | empty string | Short label printed with each log line to distinguish multiple log interceptors. Useful when several APIs share the same category but you want quick visual grouping. | "After Transformation" |
| language | false | SpEL | the language of the 'test' condition | SpEL, groovy, jsonpath, xpath |
| level | false | INFO | Log level for emitted messages. Values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL | WARN |
| maskSensitive | false | - | Whether to mask sensitive header values (e.g., Authorization, Cookies, API keys). When enabled (default), values are replaced by ****. | - |
| message | false | - | - | - |
Child Structure
| Element | Cardinality | Description |
|---|---|---|
| xmlConfig | 0..1 |