use of java.util.logging.MemoryHandler in project j2objc by google.
the class MemoryHandlerTest method testMemoryHandlerDefaultValue.
public void testMemoryHandlerDefaultValue() throws SecurityException, IOException {
props.clear();
props.put("java.util.logging.MemoryHandler.target", baseClassName + "$MockHandler");
manager.readConfiguration(EnvironmentHelper.PropertiesToInputStream(props));
handler = new MemoryHandler();
assertNull(handler.getFilter());
assertTrue(handler.getFormatter() instanceof SimpleFormatter);
assertNull(handler.getEncoding());
assertNotNull(handler.getErrorManager());
assertEquals(handler.getLevel(), Level.ALL);
assertEquals(handler.getPushLevel(), Level.SEVERE);
}
use of java.util.logging.MemoryHandler in project logging-log4j2 by apache.
the class MemoryHandlerJULLocationBenchmark method up.
@Setup(Level.Trial)
public void up() {
memoryHandler = new MemoryHandler(new NoOpJULHandler(), 262144, java.util.logging.Level.SEVERE);
logger = Logger.getLogger(getClass().getName());
logger.setUseParentHandlers(false);
logger.addHandler(memoryHandler);
logger.setLevel(java.util.logging.Level.ALL);
}
use of java.util.logging.MemoryHandler in project logging-log4j2 by apache.
the class MemoryHandlerJULBenchmark method up.
@Setup(Level.Trial)
public void up() {
memoryHandler = new MemoryHandler(new NoOpJULHandler(), 262144, java.util.logging.Level.SEVERE);
logger = java.util.logging.Logger.getLogger(getClass().getName());
logger.setUseParentHandlers(false);
logger.addHandler(memoryHandler);
logger.setLevel(java.util.logging.Level.ALL);
}
Aggregations