Actually use a log file instead of std::cout and remove a warning that's no longer applicable

This commit is contained in:
Pavel Krajcevski 2013-09-28 22:40:14 -04:00
parent 289bcc9d44
commit e11e2d1c12
2 changed files with 2 additions and 8 deletions

View File

@ -214,7 +214,7 @@ int main(int argc, char **argv) {
}
std::ofstream logFile;
ThreadSafeStreambuf streamBuf(std::cout);
ThreadSafeStreambuf streamBuf(logFile);
std::ostream logStream(&streamBuf);
if(bSaveLog) {
char logname[256];

View File

@ -196,12 +196,6 @@ int _tmain(int argc, _TCHAR* argv[])
}
} while(knowArg && fileArg < argc);
if(numThreads > 1 && bSaveLog) {
bSaveLog = false;
fprintf(stderr, "WARNING: Will not save log because implementation is not thread safe.\n"
"If you'd like, send a complaint to pavel@cs.unc.edu to get this done faster.\n");
}
if(fileArg == argc) {
PrintUsage();
exit(1);
@ -222,7 +216,7 @@ int _tmain(int argc, _TCHAR* argv[])
}
std::ofstream logFile;
ThreadSafeStreambuf streamBuf(std::cout);
ThreadSafeStreambuf streamBuf(logFile);
std::ostream logStream(&streamBuf);
if(bSaveLog) {
char logname[256];