" 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="log-payload-location" value="true"/>
</action>
jboss-log4j.xml:
When configuring the jboss-log4j.xml, use the pattern :
JBOSSESB_COMMON_STRING.DEPLOYMENT_NAME.SERVICE_CATEGORY.SERVICE_NAME
This allows you to log all instances of this action (by just using the JBOSSESB_COMMON_STRING),
log all instances within a deployment (JBOSSESB_COMMON_STRING.DEPLOYMENT_NAME), by service category name,
and by service name.
<category name="jbossesb.helloworld.esb.FirstServiceESB.SimpleListener">
<priority value="TRACE"/>
</category>
Property description:
- text Custom text to be output, defaults to action name
- log-payload-location True or False value which specifies
whether the payload location should be logged in Trace
- Author:
- noconnor@redhat.com, tcunning@redhat.com
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
COMMON_LOG4J_CATEGORY_STRING
public static final java.lang.String COMMON_LOG4J_CATEGORY_STRING
- See Also:
- Constant Field Values
_config
protected ConfigTree _config
ServiceLoggerAction
public ServiceLoggerAction()
ServiceLoggerAction
public ServiceLoggerAction(ConfigTree configTree)
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)