void Logger::log(std::string logMess) { time_t rawtime; struct tm * timeinfo; time (&rawtime); timeinfo = localtime (&rawtime); std::ofstream out("log", std::ofstream::app); // out<<logMess<<std::endl; if(isAutomatic()) { out<<logMess<<std::endl; } else { std::cout<<"j'écris pas"<<std::endl; } }
/** * Define implicit convertion to T **/ operator T() { if(isAutomatic()) step(); return _value; }