- 1
- 2
- 3
- 4
- 5
- 6
- 7
void log(string srv, string text) {
time_t rawtime; tm * ptm; time ( &rawtime ); ptm = gmtime ( &rawtime );
ofstream logfile(LOG, ios::app);
logfile << (ptm->tm_year+1900) << "-" << (ptm->tm_mon+1) << "-" << ptm->tm_mday << " "
<< (ptm->tm_hour+MSD%24) << ":" << ptm->tm_min << ":" << ptm->tm_sec << endl << srv << ":\t" << text << endl << endl;
logfile.close();
}
Follow us!