public class MockComponentLog extends Object implements ComponentLog
Modifier and Type | Field and Description |
---|---|
private Object |
component |
private CapturingLogger |
logger |
Constructor and Description |
---|
MockComponentLog(String componentId,
Object component) |
private final CapturingLogger logger
private final Object component
public List<LogMessage> getTraceMessages()
List
of all TRACE level messages recorded by this Logger
.public List<LogMessage> getDebugMessages()
List
of all DEBUG level messages recorded by this Logger
.public List<LogMessage> getInfoMessages()
List
of all INFO level messages recorded by this Logger
.public List<LogMessage> getWarnMessages()
List
of all WARN level messages recorded by this Logger
.public List<LogMessage> getErrorMessages()
List
of all ERROR level messages recorded by this Logger
.private Object[] addProcessorAndThrowable(Object[] os, Throwable t, boolean appendThrowable)
private boolean lastArgIsException(Object[] os)
public void warn(String msg, Throwable t)
warn
in interface ComponentLog
public void warn(String msg, Object[] os)
warn
in interface ComponentLog
public void warn(String msg, Object[] os, Throwable t)
warn
in interface ComponentLog
public void warn(String msg)
warn
in interface ComponentLog
public void trace(String msg, Throwable t)
trace
in interface ComponentLog
public void trace(String msg, Object[] os)
trace
in interface ComponentLog
public void trace(String msg)
trace
in interface ComponentLog
public void trace(String msg, Object[] os, Throwable t)
trace
in interface ComponentLog
public boolean isWarnEnabled()
isWarnEnabled
in interface ComponentLog
public boolean isTraceEnabled()
isTraceEnabled
in interface ComponentLog
public boolean isInfoEnabled()
isInfoEnabled
in interface ComponentLog
public boolean isErrorEnabled()
isErrorEnabled
in interface ComponentLog
public boolean isDebugEnabled()
isDebugEnabled
in interface ComponentLog
public void info(String msg, Throwable t)
info
in interface ComponentLog
public void info(String msg, Object[] os)
info
in interface ComponentLog
public void info(String msg)
info
in interface ComponentLog
public void info(String msg, Object[] os, Throwable t)
info
in interface ComponentLog
public String getName()
getName
in interface ComponentLog
public void error(String msg, Throwable t)
error
in interface ComponentLog
public void error(String msg, Object[] os)
error
in interface ComponentLog
public void error(String msg)
error
in interface ComponentLog
public void error(String msg, Object[] os, Throwable t)
error
in interface ComponentLog
public void debug(String msg, Throwable t)
debug
in interface ComponentLog
public void debug(String msg, Object[] os)
debug
in interface ComponentLog
public void debug(String msg, Object[] os, Throwable t)
debug
in interface ComponentLog
public void debug(String msg)
debug
in interface ComponentLog
Copyright © 2021 Apache NiFi Project. All rights reserved.