package org.xbib.logging.filters;

import java.util.logging.Filter;
import java.util.logging.LogRecord;

/**
 * An accept-all filter.
 */
public final class AcceptAllFilter implements Filter {

    private AcceptAllFilter() {
    }

    private static final AcceptAllFilter INSTANCE = new AcceptAllFilter();

    /**
     * Always returns {@code true}.
     *
     * @param record ignored
     * @return {@code true}
     */
    @Override
    public boolean isLoggable(final LogRecord record) {
        return true;
    }

    /**
     * Get the filter instance.
     *
     * @return the filter instance
     */
    public static AcceptAllFilter getInstance() {
        return INSTANCE;
    }
}
