simple c++ log functions