Fix compiler warnings for log.cpp