get record with highest log level in raven batch

When using the raven handler in combination with the buffer handler, the raven handler doesn't choose the record with the highest log level as main record, if it isn't the last one.