Filter duplicate log entries

I am getting tons of duplicates filling the log activity. If the current entry matches the previous, discard it.