org.apache.synapse.mediators.builtin
Class LogMediator

java.lang.Object
  extended by org.apache.synapse.mediators.AbstractMediator
      extended by org.apache.synapse.mediators.builtin.LogMediator
All Implemented Interfaces:
AspectConfigurable, Mediator, SynapseArtifact

public class LogMediator
extends AbstractMediator

Logs the specified message into the configured logger. The log levels specify which attributes would be logged, and is configurable. Additionally custom properties may be defined to the logger, where literal values or expressions could be specified for logging. The custom properties are printed into the log using the defined separator (\n, "," etc)


Field Summary
static int CATEGORY_DEBUG
           
static int CATEGORY_ERROR
           
static int CATEGORY_FATAL
           
static int CATEGORY_INFO
           
static int CATEGORY_TRACE
           
static int CATEGORY_WARN
           
static int CUSTOM
          Only properties specified to the Log mediator
static String DEFAULT_SEP
           
static int FULL
          all attributes of level 'simple' and the SOAP envelope and any properties
static int HEADERS
          All SOAP header blocks and any properties
static int SIMPLE
          To, From, WSAction, SOAPAction, ReplyTo, MessageID and any properties
 
Fields inherited from class org.apache.synapse.mediators.AbstractMediator
log, trace, traceState
 
Constructor Summary
LogMediator()
           
 
Method Summary
 void addAllProperties(List<MediatorProperty> list)
           
 void addProperty(MediatorProperty p)
           
 int getCategory()
           
 int getLogLevel()
           
 List<MediatorProperty> getProperties()
           
 String getSeparator()
           
 boolean mediate(MessageContext synCtx)
          Logs the current message according to the supplied semantics
 void setCategory(int category)
           
 void setLogLevel(int logLevel)
           
 void setSeparator(String separator)
           
 
Methods inherited from class org.apache.synapse.mediators.AbstractMediator
auditLog, auditWarn, configure, disableStatistics, enableStatistics, getAspectConfiguration, getDescription, getLog, getTraceState, getType, handleException, handleException, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, setDescription, setEffectiveTraceState, setTraceState, shouldTrace, traceOrDebug, traceOrDebugWarn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CUSTOM

public static final int CUSTOM
Only properties specified to the Log mediator

See Also:
Constant Field Values

SIMPLE

public static final int SIMPLE
To, From, WSAction, SOAPAction, ReplyTo, MessageID and any properties

See Also:
Constant Field Values

HEADERS

public static final int HEADERS
All SOAP header blocks and any properties

See Also:
Constant Field Values

FULL

public static final int FULL
all attributes of level 'simple' and the SOAP envelope and any properties

See Also:
Constant Field Values

CATEGORY_INFO

public static final int CATEGORY_INFO
See Also:
Constant Field Values

CATEGORY_DEBUG

public static final int CATEGORY_DEBUG
See Also:
Constant Field Values

CATEGORY_TRACE

public static final int CATEGORY_TRACE
See Also:
Constant Field Values

CATEGORY_WARN

public static final int CATEGORY_WARN
See Also:
Constant Field Values

CATEGORY_ERROR

public static final int CATEGORY_ERROR
See Also:
Constant Field Values

CATEGORY_FATAL

public static final int CATEGORY_FATAL
See Also:
Constant Field Values

DEFAULT_SEP

public static final String DEFAULT_SEP
See Also:
Constant Field Values
Constructor Detail

LogMediator

public LogMediator()
Method Detail

mediate

public boolean mediate(MessageContext synCtx)
Logs the current message according to the supplied semantics

Parameters:
synCtx - (current) message to be logged
Returns:
true always

getLogLevel

public int getLogLevel()

setLogLevel

public void setLogLevel(int logLevel)

getSeparator

public String getSeparator()

setSeparator

public void setSeparator(String separator)

addProperty

public void addProperty(MediatorProperty p)

addAllProperties

public void addAllProperties(List<MediatorProperty> list)

getProperties

public List<MediatorProperty> getProperties()

getCategory

public int getCategory()

setCategory

public void setCategory(int category)


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.