code: 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;
      }
docs: Filter logs of a specific level.
  
  @param level the level of the logs to return
  @return the filtered logs
  @since 4.1RC1