int main(int argc, char *argv[]){
try {
- //remove old logfile
-// string log = "mothur.logFile";
-// remove(log.c_str());
+ string log = "mothur.logFile";
+ remove(log.c_str());
time_t ltime = time(NULL); /* calendar time */
string logFileName = "mothur." + toString(ltime) + ".logfile";
//header
- mothurOut("mothur v.1.7.2");
+ mothurOut("mothur v.1.8");
mothurOutEndLine();
- mothurOut("Last updated: 12/04/2009");
+ mothurOut("Last updated: 2/02/2010");
mothurOutEndLine();
mothurOutEndLine();
mothurOut("by");
string outputDir = mothur->getOutputDir();
logFileName = outputDir + logFileName;
- delete mothur;
-
-// rename(log.c_str(), logFileName.c_str()); //logfile with timestamp
+ //need this because mothur.h makes the logfile, but doesn't know where to put it
+ rename(log.c_str(), logFileName.c_str()); //logfile with timestamp
+ delete mothur;
+
return 0;
}
catch(exception& e) {