public List<LogEvent> getLogs(LogLevel level)
    {
        List<LogEvent> levelLogs = new LinkedList<LogEvent>();

        for (LogEvent log : this) {
            if (log.getLevel() == level) {
                levelLogs.add(log);
            }
        }

        return levelLogs;
    }
public List < LogEvent > getLogs ( LogLevel level ) { List < LogEvent > levelLogs = new LinkedList < LogEvent > ( ) ; for ( LogEvent log : this ) { if ( log . getLevel ( ) == level ) { levelLogs . add ( log ) ; } } return levelLogs ; }
Filter logs of a specific level.

@param level the level of the logs to return
@return the filtered logs
@since 4.1RC1