Package org.apache.synapse
Interface SynapseLog
-
- All Known Implementing Classes:
MediatorLog
public interface SynapseLogSynapse logging interface. This interface defines a set of Synapse specific log levels.Note that the definition of this interface is not yet stable. Please refer to https://issues.apache.org/jira/browse/SYNAPSE-374 for more information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidauditDebug(Object msg)Log an audit message at the TRACE category.voidauditError(Object msg)Log an audit message at the ERROR category.voidauditFatal(Object msg)Log an audit message at the FATAL category.voidauditLog(Object msg)Log an audit message.voidauditTrace(Object msg)Log an audit message at the TRACE category.voidauditWarn(Object msg)Log a warning message.voiderror(Object msg)Log a message at level 'error'.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 totraceOrDebug(Object)would actually cause a log message to be written to the logs.booleanisTraceTraceEnabled()Check whether a call totraceTrace(Object)would actually cause a log message to be written to the logs.voidlogSynapseException(String msg, Throwable cause)Log a fatal exception.voidtraceOrDebug(Object msg)Log a message at level 'traceOrDebug'.voidtraceOrDebugWarn(Object msg)Log a message at level 'traceOrDebugWarn'.voidtraceTrace(Object msg)Log a message at level 'traceTrace'.
-
-
-
Method Detail
-
isTraceOrDebugEnabled
boolean isTraceOrDebugEnabled()
Check whether a call totraceOrDebug(Object)would actually cause a log message to be written to the logs.- Returns:
trueif trace or debug is enabled
-
isDebugEnabled
boolean isDebugEnabled()
Check whether a call to#debug(Object)would actually cause a log message to be written to the logs.- Returns:
trueif trace or debug is enabled
-
isTraceEnabled
boolean isTraceEnabled()
Check whether a call to#trace(Object)would actually cause a log message to be written to the logs.- Returns:
trueif trace or debug is enabled
-
traceOrDebug
void traceOrDebug(Object msg)
Log a message at level 'traceOrDebug'. In mediators this method should be used to replace the following code:if (traceOrDebugOn) { traceOrDebug(traceOn, ...); }- Parameters:
msg- the message to be logged
-
traceOrDebugWarn
void traceOrDebugWarn(Object msg)
Log a message at level 'traceOrDebugWarn'. In mediators this method should be used to replace the following code:if (traceOrDebugOn) { traceOrDebugWarn(...); }- Parameters:
msg- the message to be logged
-
isTraceTraceEnabled
boolean isTraceTraceEnabled()
Check whether a call totraceTrace(Object)would actually cause a log message to be written to the logs.- Returns:
trueif trace is enabled for the trace log
-
traceTrace
void traceTrace(Object msg)
Log a message at level 'traceTrace'. In mediators this method should be used to replace the following code:if (traceOn && trace.isTraceEnabled()) { trace.trace(...); }- Parameters:
msg- the message to be logged
-
auditLog
void auditLog(Object msg)
Log an audit message. In mediators this method should be used to replaceAbstractMediator.auditLog(String, MessageContext).- Parameters:
msg- the message to be logged
-
auditDebug
void auditDebug(Object msg)
Log an audit message at the TRACE category.- Parameters:
msg- the message to be logged
-
auditTrace
void auditTrace(Object msg)
Log an audit message at the TRACE category.- Parameters:
msg- the message to be logged
-
auditWarn
void auditWarn(Object msg)
Log a warning message. In mediators this method should be used to replaceAbstractMediator.auditWarn(String, MessageContext).- Parameters:
msg- the message to be logged
-
auditError
void auditError(Object msg)
Log an audit message at the ERROR category.- Parameters:
msg- the message to be logged
-
auditFatal
void auditFatal(Object msg)
Log an audit message at the FATAL category.- Parameters:
msg- the message to be logged
-
error
void error(Object msg)
Log a message at level 'error'.- Parameters:
msg- the message to be logged
-
logSynapseException
void logSynapseException(String msg, Throwable cause)
Log a fatal exception. This method should only be called when aSynapseExceptionis being thrown.- Parameters:
msg- the message of the exceptioncause- the cause of the exception
-
-