Added logging functions for C++

For #18