public List < LogRecord > filter ( Severity severity ) { // FIXME: find better name or replace with stream final List < LogRecord > records = new ArrayList <> ( ) ; for ( LogRecord record : this . records ) { if ( record . getSeverity ( ) . ordinal ( ) >= severity . ordinal ( ) ) records . add ( record ) ; } return records ; }
Returns LogRecords that are equal or above the severity level .