#endif
//header
- m->mothurOut("mothur v.1.8");
+ m->mothurOut("mothur v.1.9");
m->mothurOutEndLine();
- m->mothurOut("Last updated: 2/02/2010");
+ m->mothurOut("Last updated: 4/16/2010");
m->mothurOutEndLine();
m->mothurOutEndLine();
m->mothurOut("by");
while(bail == 0) { bail = mothur->getInput(); }
+ //closes logfile so we can rename
+ m->closeLog();
+
string outputDir = mothur->getOutputDir();
- string newlogFileName = outputDir + logFileName;
-
- //need this because m->mothurOut makes the logfile, but doesn't know where to put it
- rename(logFileName.c_str(), newlogFileName.c_str()); //logfile with timestamp
+ string tempLog = mothur->getLogFileName();
+ bool append = mothur->getAppend();
+ string newlogFileName;
+ if (tempLog != "") {
+ newlogFileName = outputDir + tempLog;
+
+ if (!append) {
+ //need this because m->mothurOut makes the logfile, but doesn't know where to put it
+ rename(logFileName.c_str(), newlogFileName.c_str()); //logfile with timestamp
+
+ }else {
+ ofstream outNewLog;
+ openOutputFileAppend(newlogFileName, outNewLog);
+ outNewLog << endl << endl << "*********************************************************************************" << endl << endl;
+ outNewLog.close();
+
+ appendFiles(logFileName, newlogFileName);
+ remove(logFileName.c_str());
+ }
+ }else{
+ newlogFileName = outputDir + logFileName;
+ //need this because m->mothurOut makes the logfile, but doesn't know where to put it
+ rename(logFileName.c_str(), newlogFileName.c_str()); //logfile with timestamp
+ }
+
+
delete mothur;
#ifdef USE_MPI