for (int i = 0; i < msg.length; i++) {
msg[i] = 'A';
}
LoggingEvent event1 =
new LoggingEvent(
"org.apache.log4j.Logger", logger, Level.DEBUG, new String(msg), null);
HTMLLayout layout = (HTMLLayout) createLayout();
layout.setLocationInfo(true);
String result = layout.format(event1);
Exception ex = new IllegalArgumentException("'foo' is not a valid value.");
LoggingEvent event2 =
new LoggingEvent(
"org.apache.log4j.Logger", logger, Level.WARN, "Hello, World", ex);
result = layout.format(event2);
assertEquals(
Layout.LINE_SEP + "<tr>",
result.substring(0, Layout.LINE_SEP.length() + 4));