Class MockComponentLog

java.lang.Object
org.apache.nifi.util.MockComponentLog
All Implemented Interfaces:
org.apache.nifi.logging.ComponentLog

public class MockComponentLog extends Object implements org.apache.nifi.logging.ComponentLog
  • Field Details

  • Constructor Details

    • MockComponentLog

      public MockComponentLog(String componentId, Object component)
  • Method Details

    • getTraceMessages

      public List<LogMessage> getTraceMessages()
      Returns:
      a List of all TRACE level messages recorded by this Logger.
    • getDebugMessages

      public List<LogMessage> getDebugMessages()
      Returns:
      a List of all DEBUG level messages recorded by this Logger.
    • getInfoMessages

      public List<LogMessage> getInfoMessages()
      Returns:
      a List of all INFO level messages recorded by this Logger.
    • getWarnMessages

      public List<LogMessage> getWarnMessages()
      Returns:
      a List of all WARN level messages recorded by this Logger.
    • getErrorMessages

      public List<LogMessage> getErrorMessages()
      Returns:
      a List of all ERROR level messages recorded by this Logger.
    • addProcessor

      private Object[] addProcessor(Object[] originalArgs)
    • addProcessorAndFormattedThrowable

      private Object[] addProcessorAndFormattedThrowable(Object[] originalArgs)
    • prependToArgs

      private Object[] prependToArgs(Object[] originalArgs, Object... toAdd)
    • lastArgIsException

      private boolean lastArgIsException(Object[] os)
    • warn

      public void warn(String msg, Throwable t)
      Specified by:
      warn in interface org.apache.nifi.logging.ComponentLog
    • warn

      public void warn(String msg, Object... os)
      Specified by:
      warn in interface org.apache.nifi.logging.ComponentLog
    • warn

      public void warn(String msg)
      Specified by:
      warn in interface org.apache.nifi.logging.ComponentLog
    • trace

      public void trace(String msg, Throwable t)
      Specified by:
      trace in interface org.apache.nifi.logging.ComponentLog
    • trace

      public void trace(String msg, Object... os)
      Specified by:
      trace in interface org.apache.nifi.logging.ComponentLog
    • trace

      public void trace(String msg)
      Specified by:
      trace in interface org.apache.nifi.logging.ComponentLog
    • isWarnEnabled

      public boolean isWarnEnabled()
      Specified by:
      isWarnEnabled in interface org.apache.nifi.logging.ComponentLog
    • isTraceEnabled

      public boolean isTraceEnabled()
      Specified by:
      isTraceEnabled in interface org.apache.nifi.logging.ComponentLog
    • isInfoEnabled

      public boolean isInfoEnabled()
      Specified by:
      isInfoEnabled in interface org.apache.nifi.logging.ComponentLog
    • isErrorEnabled

      public boolean isErrorEnabled()
      Specified by:
      isErrorEnabled in interface org.apache.nifi.logging.ComponentLog
    • isDebugEnabled

      public boolean isDebugEnabled()
      Specified by:
      isDebugEnabled in interface org.apache.nifi.logging.ComponentLog
    • info

      public void info(String msg, Throwable t)
      Specified by:
      info in interface org.apache.nifi.logging.ComponentLog
    • info

      public void info(String msg, Object... os)
      Specified by:
      info in interface org.apache.nifi.logging.ComponentLog
    • info

      public void info(String msg)
      Specified by:
      info in interface org.apache.nifi.logging.ComponentLog
    • getName

      public String getName()
      Specified by:
      getName in interface org.apache.nifi.logging.ComponentLog
    • error

      public void error(String msg, Throwable t)
      Specified by:
      error in interface org.apache.nifi.logging.ComponentLog
    • error

      public void error(String msg, Object... os)
      Specified by:
      error in interface org.apache.nifi.logging.ComponentLog
    • error

      public void error(String msg)
      Specified by:
      error in interface org.apache.nifi.logging.ComponentLog
    • debug

      public void debug(String msg, Throwable t)
      Specified by:
      debug in interface org.apache.nifi.logging.ComponentLog
    • debug

      public void debug(String msg, Object... os)
      Specified by:
      debug in interface org.apache.nifi.logging.ComponentLog
    • debug

      public void debug(String msg)
      Specified by:
      debug in interface org.apache.nifi.logging.ComponentLog