Improve log test function.