@@ -0,0 +1,2137 @@
+/*%0A * Copyright 2015 Datalogics, Inc.%0A */%0A%0Apackage com.datalogics.pdf.samples.util;%0A%0Aimport java.util.List;%0Aimport java.util.logging.Handler;%0Aimport java.util.logging.Level;%0Aimport java.util.logging.LogRecord;%0Aimport java.util.logging.Logger;%0A%0Apublic class LogRecordListCollector implements AutoCloseable %7B%0A    private static class LogRecordHandler extends Handler %7B%0A        private final List%3CLogRecord%3E logRecordList;%0A%0A        /**%0A         * Create a handler that records records to a list.%0A         *%0A         * @param logRecordList the list to receive the log records.%0A         */%0A        public LogRecordHandler(final List%3CLogRecord%3E logRecordList) %7B%0A            super();%0A            this.logRecordList = logRecordList;%0A        %7D%0A%0A        /*%0A         * (non-Javadoc)%0A         * %0A         * @see java.util.logging.Handler#publish(java.util.logging.LogRecord)%0A         */%0A        @Override%0A        public void publish(final LogRecord record) %7B%0A            logRecordList.add(record);%0A        %7D%0A%0A        /*%0A         * (non-Javadoc)%0A         * %0A         * @see java.util.logging.Handler#flush()%0A         */%0A        @Override%0A        public void flush() %7B%7D%0A%0A        /*%0A         * (non-Javadoc)%0A         * %0A         * @see java.util.logging.Handler#close()%0A         */%0A        @Override%0A        public void close() throws SecurityException %7B%7D%0A    %7D%0A%0A    private final Logger targetLogger;%0A    private final Handler handler;%0A%0A%0A    /**%0A     * Make a list of every %7B@link LogRecord%7D sent to a %7B@link Logger%7D.%0A     *%0A     * @param targetLogger the logger to monitor%0A     * @param logRecordList a list to receive the%0A     */%0A    public LogRecordListCollector(final Logger targetLogger, final List%3CLogRecord%3E logRecordList) %7B%0A        super();%0A        this.targetLogger = targetLogger;%0A        this.handler = new LogRecordHandler(logRecordList);%0A        this.handler.setLevel(Level.ALL);%0A        this.targetLogger.addHandler(this.handler);%0A    %7D%0A%0A    /*%0A     * (non-Javadoc)%0A     * %0A     * @see java.lang.AutoCloseable#close()%0A     */%0A    @Override%0A    public void close() throws Exception %7B%0A        targetLogger.removeHandler(handler);%0A    %7D%0A%0A%7D%0A

Add LogRecordListCollector class to utility package