Add a discard threshold for error logger