Package org.apache.synapse.mediators
Class MediatorLog
- java.lang.Object
-
- org.apache.synapse.mediators.MediatorLog
-
- All Implemented Interfaces:
SynapseLog
public class MediatorLog extends Object implements SynapseLog
Concrete implementation of theSynapseLoginterface appropriate for usage in a mediator. Instances of this class should not be created directly but by using the factory methodAbstractMediator.getLog(org.apache.synapse.MessageContext).Note that this is work in progress. Please refer to https://issues.apache.org/jira/browse/SYNAPSE-374 for more information.
-
-
Constructor Summary
Constructors Constructor Description MediatorLog(org.apache.commons.logging.Log defaultLog, boolean traceOn, MessageContext synCtx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidauditDebug(Object msg)Log a message at level DEBUG to all available/enabled logs.voidauditError(Object msg)Log a message at level ERROR to all available/enabled logs.voidauditFatal(Object msg)Log a message at level FATAL to all available/enabled logs.voidauditLog(Object msg)Log a message at level INFO to all available/enabled logs.voidauditTrace(Object msg)Log a message at level TRACE to all available/enabled logs.voidauditWarn(Object msg)Log a message at level WARN to all available/enabled logs.voiderror(Object msg)Log a message at level ERROR to the default log and to the trace, if trace is enabled.booleanisDebugEnabled()Check whether a call to#debug(Object)would actually cause a log message to be written to the logs.booleanisTraceEnabled()Check whether a call to#trace(Object)would actually cause a log message to be written to the logs.booleanisTraceOrDebugEnabled()Check whether a call toSynapseLog.traceOrDebug(Object)would actually cause a log message to be written to the logs.booleanisTraceTraceEnabled()Check whether a call toSynapseLog.traceTrace(Object)would actually cause a log message to be written to the logs.voidlogSynapseException(String msg, Throwable cause)Log a message at level ERROR to the default log, the service log and the trace, if trace is enabled.voidtraceOrDebug(Object msg)Log a message to the default log at level DEBUG and and to the trace log at level INFO if trace is enabled for the mediator.voidtraceOrDebugWarn(Object msg)Log a message at level WARN to the default log, if level DEBUG is enabled, and to the trace log, if trace is enabled for the mediator.voidtraceTrace(Object msg)Log a message to the trace log at level TRACE if trace is enabled for the mediator.
-
-
-
Constructor Detail
-
MediatorLog
public MediatorLog(org.apache.commons.logging.Log defaultLog, boolean traceOn, MessageContext synCtx)
-
-
Method Detail
-
isTraceOrDebugEnabled
public boolean isTraceOrDebugEnabled()
Description copied from interface:SynapseLogCheck whether a call toSynapseLog.traceOrDebug(Object)would actually cause a log message to be written to the logs.- Specified by:
isTraceOrDebugEnabledin interfaceSynapseLog- Returns:
trueif trace or debug is enabled
-
isDebugEnabled
public boolean isDebugEnabled()
Description copied from interface:SynapseLogCheck whether a call to#debug(Object)would actually cause a log message to be written to the logs.- Specified by:
isDebugEnabledin interfaceSynapseLog- Returns:
trueif trace or debug is enabled
-
isTraceEnabled
public boolean isTraceEnabled()
Description copied from interface:SynapseLogCheck whether a call to#trace(Object)would actually cause a log message to be written to the logs.- Specified by:
isTraceEnabledin interfaceSynapseLog- Returns:
trueif trace or debug is enabled
-
traceOrDebug
public void traceOrDebug(Object msg)
Log a message to the default log at level DEBUG and and to the trace log at level INFO if trace is enabled for the mediator.- Specified by:
traceOrDebugin interfaceSynapseLog- Parameters:
msg- the message to be logged
-
traceOrDebugWarn
public void traceOrDebugWarn(Object msg)
Log a message at level WARN to the default log, if level DEBUG is enabled, and to the trace log, if trace is enabled for the mediator.- Specified by:
traceOrDebugWarnin interfaceSynapseLog- Parameters:
msg- the message to be logged
-
isTraceTraceEnabled
public boolean isTraceTraceEnabled()
Description copied from interface:SynapseLogCheck whether a call toSynapseLog.traceTrace(Object)would actually cause a log message to be written to the logs.- Specified by:
isTraceTraceEnabledin interfaceSynapseLog- Returns:
trueif trace is enabled for the trace log
-
traceTrace
public void traceTrace(Object msg)
Log a message to the trace log at level TRACE if trace is enabled for the mediator.- Specified by:
traceTracein interfaceSynapseLog- Parameters:
msg- the message to be logged
-
auditLog
public void auditLog(Object msg)
Log a message at level INFO to all available/enabled logs.- Specified by:
auditLogin interfaceSynapseLog- Parameters:
msg- the message to be logged
-
auditDebug
public void auditDebug(Object msg)
Log a message at level DEBUG to all available/enabled logs.- Specified by:
auditDebugin interfaceSynapseLog- Parameters:
msg- the message to be logged
-
auditTrace
public void auditTrace(Object msg)
Log a message at level TRACE to all available/enabled logs.- Specified by:
auditTracein interfaceSynapseLog- Parameters:
msg- the message to be logged
-
auditWarn
public void auditWarn(Object msg)
Log a message at level WARN to all available/enabled logs.- Specified by:
auditWarnin interfaceSynapseLog- Parameters:
msg- the message to be logged
-
auditError
public void auditError(Object msg)
Log a message at level ERROR to all available/enabled logs.- Specified by:
auditErrorin interfaceSynapseLog- Parameters:
msg- the message to be logged
-
auditFatal
public void auditFatal(Object msg)
Log a message at level FATAL to all available/enabled logs.- Specified by:
auditFatalin interfaceSynapseLog- Parameters:
msg- the message to be logged
-
error
public void error(Object msg)
Log a message at level ERROR to the default log and to the trace, if trace is enabled.- Specified by:
errorin interfaceSynapseLog- Parameters:
msg- the message to be logged
-
logSynapseException
public void logSynapseException(String msg, Throwable cause)
Log a message at level ERROR to the default log, the service log and the trace, if trace is enabled.- Specified by:
logSynapseExceptionin interfaceSynapseLog- Parameters:
msg- the message of the exceptioncause- the cause of the exception
-
-