Catch when a recursive stack trace is logged and limit the number of displayed frames.