Skip to content

Commit

Permalink
Introduce a new attribute to log mediator to print full log message
Browse files Browse the repository at this point in the history
  • Loading branch information
arunans23 committed Feb 6, 2025
1 parent 1a0ef2e commit c445464
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public class LogMediatorFactory extends AbstractMediatorFactory {
private static final QName ATT_CATEGORY = new QName("category");
protected static final QName ELEMENT_MESSAGE_Q
= new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "message");
private static final QName ATT_LOG_FULL_PAYLOAD = new QName("logFullPayload");

public QName getTagQName() {
return LOG_Q;
Expand Down Expand Up @@ -84,9 +85,12 @@ public Mediator createSpecificMediator(OMElement elem, Properties properties) {
}
}

OMAttribute logFullPayload = elem.getAttribute(ATT_LOG_FULL_PAYLOAD);
// Set the high level set of properties to be logged (i.e. log level)
OMAttribute level = elem.getAttribute(ATT_LEVEL);
if (level != null) {
if (logFullPayload != null) {
logMediator.setLogLevel(LogMediator.FULL);
} else if (level != null) {
String levelstr = level.getAttributeValue();
if (SIMPLE.equals(levelstr)) {
logMediator.setLogLevel(LogMediator.SIMPLE);
Expand Down

0 comments on commit c445464

Please sign in to comment.