Search in sources :

Example 1 with NoOpJULHandler

use of org.apache.logging.log4j.perf.util.NoOpJULHandler 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);
}
Also used : MemoryHandler(java.util.logging.MemoryHandler) NoOpJULHandler(org.apache.logging.log4j.perf.util.NoOpJULHandler) Setup(org.openjdk.jmh.annotations.Setup)

Example 2 with NoOpJULHandler

use of org.apache.logging.log4j.perf.util.NoOpJULHandler 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);
}
Also used : MemoryHandler(java.util.logging.MemoryHandler) NoOpJULHandler(org.apache.logging.log4j.perf.util.NoOpJULHandler) Setup(org.openjdk.jmh.annotations.Setup)

Aggregations

MemoryHandler (java.util.logging.MemoryHandler)2 NoOpJULHandler (org.apache.logging.log4j.perf.util.NoOpJULHandler)2 Setup (org.openjdk.jmh.annotations.Setup)2