Logger logger = LogManager.getLogger(TestLog4jAppender.class);
for(int count = 0; count <= 1000; count++){
int level = count % 5;
String msg = "This is log message number" + String.valueOf(count);
logger.log(Level.toLevel(level), msg);
Transaction transaction = ch.getTransaction();
transaction.begin();
Event event = ch.take();
Assert.assertNotNull(event);
Assert.assertEquals(new String(event.getBody(), "UTF8"), msg);