Search in sources :

Example 1 with LogCapture

use of org.opendaylight.infrautils.testutils.LogCapture in project infrautils by opendaylight.

the class RememberingLogger method error.

@Override
public void error(String format, Object... arguments) {
    FormattingTuple mf = MessageFormatter.arrayFormat(format, arguments);
    ERRORS.add(new LogCapture(ERROR, mf.getMessage(), mf.getThrowable()));
    super.error(format, arguments);
}
Also used : LogCapture(org.opendaylight.infrautils.testutils.LogCapture) FormattingTuple(org.slf4j.helpers.FormattingTuple)

Example 2 with LogCapture

use of org.opendaylight.infrautils.testutils.LogCapture in project infrautils by opendaylight.

the class RememberingLogger method error.

@Override
public void error(String msg) {
    ERRORS.add(new LogCapture(ERROR, msg, null));
    super.error(msg);
}
Also used : LogCapture(org.opendaylight.infrautils.testutils.LogCapture)

Example 3 with LogCapture

use of org.opendaylight.infrautils.testutils.LogCapture in project infrautils by opendaylight.

the class RememberingLogger method error.

@Override
public void error(String msg, Throwable throwable) {
    ERRORS.add(new LogCapture(ERROR, msg, throwable));
    super.error(msg, throwable);
}
Also used : LogCapture(org.opendaylight.infrautils.testutils.LogCapture)

Example 4 with LogCapture

use of org.opendaylight.infrautils.testutils.LogCapture in project infrautils by opendaylight.

the class RememberingLogger method error.

@Override
public void error(Marker marker, String format, Object... arguments) {
    if (!LogRule.getMarker().equals(marker)) {
        FormattingTuple mf = MessageFormatter.arrayFormat(format, arguments);
        ERRORS.add(new LogCapture(ERROR, mf.getMessage(), mf.getThrowable()));
    }
    super.error(marker, format, arguments);
}
Also used : LogCapture(org.opendaylight.infrautils.testutils.LogCapture) FormattingTuple(org.slf4j.helpers.FormattingTuple)

Aggregations

LogCapture (org.opendaylight.infrautils.testutils.LogCapture)4 FormattingTuple (org.slf4j.helpers.FormattingTuple)2