Add optimization logger to distance-to-sphere test.