Discard messages after logging them.