Improve Optimizer logging tests