Multiple log in input, how to filter one by one?

This thread has an example of making adding fields to a record in filebeat and using conditionals in the filter in logstash.