Reimplement log filtering