|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.api.processor.LoggerMessageProcessor
public class LoggerMessageProcessor
MessageProcessor implementation that logs the current element of a value evaluated from it using
an expression evaluator. By default the current messages is logged using the Level.DEBUG
level to the 'org.mule.api.processor.LoggerMessageProcessor' category. The level and
category can both be configured to suit your needs.
| Field Summary | |
|---|---|
protected String |
category
|
protected ExpressionManager |
expressionManager
|
protected String |
level
|
protected org.apache.commons.logging.Log |
logger
|
protected String |
message
|
protected MuleContext |
muleContext
|
| Fields inherited from interface org.mule.api.lifecycle.Initialisable |
|---|
PHASE_NAME |
| Fields inherited from interface org.mule.api.AnnotatedObject |
|---|
PROPERTY_NAME |
| Constructor Summary | |
|---|---|
LoggerMessageProcessor()
|
|
| Method Summary | |
|---|---|
Object |
getAnnotation(QName name)
Gets the value of specified annotation. |
Map<QName,Object> |
getAnnotations()
Gets all annotations. |
void |
initialise()
Method used to perform any initialisation work. |
protected void |
initLogger()
|
protected void |
log(MuleEvent event)
|
protected void |
logWithLevel(Object object)
|
MuleEvent |
process(MuleEvent event)
Invokes the MessageProcessor. |
void |
setAnnotations(Map<QName,Object> newAnnotations)
Sets annotations to the object. |
void |
setCategory(String category)
|
void |
setLevel(String level)
|
void |
setMessage(String message)
|
void |
setMuleContext(MuleContext muleContext)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected transient org.apache.commons.logging.Log logger
protected String message
protected String category
protected String level
protected MuleContext muleContext
protected ExpressionManager expressionManager
| Constructor Detail |
|---|
public LoggerMessageProcessor()
| Method Detail |
|---|
public void initialise()
throws InitialisationException
InitialisableInitialisationException should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
initialise in interface InitialisableInitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered fromprotected void initLogger()
public MuleEvent process(MuleEvent event)
throws MuleException
MessageProcessor
process in interface MessageProcessorevent - MuleEvent to be processed
MuleExceptionprotected void log(MuleEvent event)
protected void logWithLevel(Object object)
public void setMuleContext(MuleContext muleContext)
setMuleContext in interface MuleContextAwarepublic void setMessage(String message)
public void setCategory(String category)
public void setLevel(String level)
public final Object getAnnotation(QName name)
AnnotatedObject
getAnnotation in interface AnnotatedObjectpublic final Map<QName,Object> getAnnotations()
AnnotatedObject
getAnnotations in interface AnnotatedObjectpublic final void setAnnotations(Map<QName,Object> newAnnotations)
AnnotatedObject
setAnnotations in interface AnnotatedObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||