modify log.h and add log.cpp test