Use std::function instead of pointer to function for logging.
function.cpp now compiles correctly if OpenMP is not available.