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.

See Also:
AbstractMediator.getLog(org.apache.synapse.MessageContext)

Method Summary
 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 isTraceOrDebugEnabled()
          Check whether a call to traceOrDebug(Object) would actually cause a log message to be written to the logs.
 boolean isTraceTraceEnabled()
          Check whether a call to traceTrace(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 to traceOrDebug(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 to traceTrace(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 replace AbstractMediator.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 replace AbstractMediator.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 a SynapseException is being thrown.

Parameters:
msg - the message of the exception
cause - the cause of the exception


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.