001package org.slf4j.jul; 002 003import java.util.concurrent.atomic.AtomicLong; 004import java.util.logging.Handler; 005import java.util.logging.LogRecord; 006 007public class CountingHandler extends Handler { 008 009 final AtomicLong eventCount = new AtomicLong(0); 010 011 @Override 012 public void publish(LogRecord record) { 013 eventCount.getAndIncrement(); 014 } 015 016 @Override 017 public void flush() { 018 } 019 020 @Override 021 public void close() throws SecurityException { 022 } 023 024}