Package org.apache.synapse
Interface SynapseLog
-
- All Known Implementing Classes:
MediatorLog
public interface SynapseLog
Synapse 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 void
auditDebug(Object msg)
Log an audit message at the TRACE category.void
auditError(Object msg)
Log an audit message at the ERROR category.void
auditFatal(Object msg)
Log an audit message at the FATAL category.void
auditLog(Object msg)
Log an audit message.void
auditTrace(Object msg)
Log an audit message at the TRACE category.void
auditWarn(Object msg)
Log a warning message.void
error(Object msg)
Log a message at level 'error'.boolean
isDebugEnabled()
Check whether a call to#debug(Object)
would actually cause a log message to be written to the logs.boolean
isTraceEnabled()
Check whether a call to#trace(Object)
would actually cause a log message to be written to the logs.boolean
isTraceOrDebugEnabled()
Check whether a call totraceOrDebug(Object)
would actually cause a log message to be written to the logs.boolean
isTraceTraceEnabled()
Check whether a call totraceTrace(Object)
would actually cause a log message to be written to the logs.void
logSynapseException(String msg, Throwable cause)
Log a fatal exception.void
traceOrDebug(Object msg)
Log a message at level 'traceOrDebug'.void
traceOrDebugWarn(Object msg)
Log a message at level 'traceOrDebugWarn'.void
traceTrace(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:
true
if 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:
true
if 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:
true
if 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:
true
if 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 aSynapseException
is being thrown.- Parameters:
msg
- the message of the exceptioncause
- the cause of the exception
-
-