add log utils and its test case.