Event logger using C++ idioms