enhance unit test for deprecated log function