[PATCH 5/5] logging: Move the filter check up as well