Code example for LogRecord

Methods: getMessage

0
	} 
 
	public void testSetPushLevel() { 
		// change push level don't trigger push action 
		writer.getBuffer().setLength(0);
		LogRecord lr = new LogRecord(Level.CONFIG, "lr");
		assertTrue(handler.isLoggable(lr));
		handler.publish(lr);
		assertEquals(writer.toString(), "");
		// assertEquals(writer.toString(), "flush"); 
		writer.getBuffer().setLength(0);
		handler.setPushLevel(Level.FINE);
		assertEquals(writer.toString(), "");
		handler.publish(lr);
		assertEquals(writer.toString(), lr.getMessage() + lr.getMessage());
	} 
 
	public void testPushPublic() { 
		writer.getBuffer().setLength(0);
		// loggable but don't trig push