Codebase list libslf4j-java / f7c36fa8-8f28-48f1-b3cf-3236edba321a/main slf4j-jdk14 / src / test / java / org / slf4j / helpers / CountingHandler.java
f7c36fa8-8f28-48f1-b3cf-3236edba321a/main

Tree @f7c36fa8-8f28-48f1-b3cf-3236edba321a/main (Download .tar.gz)

CountingHandler.java @f7c36fa8-8f28-48f1-b3cf-3236edba321a/mainraw · history · blame

package org.slf4j.helpers;

import java.util.concurrent.atomic.AtomicLong;
import java.util.logging.Handler;
import java.util.logging.LogRecord;

public class CountingHandler extends Handler {

    final AtomicLong eventCount = new AtomicLong(0);
    
    @Override
    public void publish(LogRecord record) {
        eventCount.getAndIncrement();
    }

    @Override
    public void flush() {
    }

    @Override
    public void close() throws SecurityException {
    }

}