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 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
      • 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 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
      • 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
      • 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