use of org.apache.logging.log4j.message.SimpleMessageFactory in project logging-log4j2 by apache.
the class LoggerTest method getLogger_String_SimpleMessageFactory.
@Test
public void getLogger_String_SimpleMessageFactory() {
final SimpleMessageFactory messageFactory = SimpleMessageFactory.INSTANCE;
final TestLogger testLogger = (TestLogger) LogManager.getLogger("getLogger_String_StringFormatterMessageFactory", messageFactory);
assertNotNull(testLogger);
assertEqualMessageFactory(messageFactory, testLogger);
testLogger.debug("{} %,d {foo}", Integer.MAX_VALUE);
assertEquals(1, testLogger.getEntries().size());
assertEquals(" DEBUG {} %,d {foo}", testLogger.getEntries().get(0));
}
Aggregations