org.jboss.soa.esb.actions
Class ServiceLoggerAction

java.lang.Object
  extended by org.jboss.soa.esb.actions.AbstractActionLifecycle
      extended by org.jboss.soa.esb.actions.ServiceLoggerAction
All Implemented Interfaces:
ActionLifecycle

public class ServiceLoggerAction
extends AbstractActionLifecycle

Simple action that logs custom text and possibly the message to a logger using the "." appender. This action differs from LogAction in that it allows you to set LogLevelAction on a per service basis, rather than on a per-action basis, and that it allows you to log custom text. Debug level setting will result in the ESB message being output. Trace level setting will result in the output of the message payload Here is an example of how to use this within your jboss-esb.xml :

<action name="ServiceLoggerAction" class="org.jboss.soa.esb.actions.ServiceLoggerAction">
   <property name="text" value="Reached here"/>
   <property name="get-payload-location" value="foo"/>
</action>

Property description:

Author:
noconnor@redhat.com, tcunning@redhat.com

Field Summary
protected  ConfigTree _config
           
static java.lang.String LOG_PAYLOAD_LOCATION_TAG
           
static java.lang.String TEXT_TAG
           
 
Constructor Summary
ServiceLoggerAction()
           
ServiceLoggerAction(ConfigTree configTree)
           
 
Method Summary
 org.apache.log4j.Logger getLogger()
           
 java.lang.String getText()
           
 boolean isLogPayloadLocation()
           
 Message process(Message message)
           
 void setLogPayloadLocation(boolean logPayloadLocation)
           
 void setText(java.lang.String text)
           
 
Methods inherited from class org.jboss.soa.esb.actions.AbstractActionLifecycle
destroy, initialise
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEXT_TAG

public static final java.lang.String TEXT_TAG
See Also:
Constant Field Values

LOG_PAYLOAD_LOCATION_TAG

public static final java.lang.String LOG_PAYLOAD_LOCATION_TAG
See Also:
Constant Field Values

_config

protected ConfigTree _config
Constructor Detail

ServiceLoggerAction

public ServiceLoggerAction()

ServiceLoggerAction

public ServiceLoggerAction(ConfigTree configTree)
Method Detail

isLogPayloadLocation

public boolean isLogPayloadLocation()

setLogPayloadLocation

public void setLogPayloadLocation(boolean logPayloadLocation)

getText

public java.lang.String getText()

setText

public void setText(java.lang.String text)

getLogger

public org.apache.log4j.Logger getLogger()

process

@Process
public Message process(Message message)