Index: LogFile.cc =================================================================== RCS file: /home/max/cvsmirror/cygwin-apps-cvs/setup/LogFile.cc,v retrieving revision 2.6 diff -u -p -r2.6 LogFile.cc --- LogFile.cc 25 Nov 2002 00:41:24 -0000 2.6 +++ LogFile.cc 9 Mar 2003 00:17:10 -0000 @@ -102,6 +102,25 @@ LogFile::setFile (int minlevel, String c } void +LogFile::flush_log() +{ + for (FileSet::iterator i = files.begin(); + i != files.end(); ++i) + { + log_save (i->level, i->key, i->append); + } + LogEnt *l = first_logent; + first_logent = 0; + next_logent = &first_logent; + while (l) + { + LogEnt *next = l->next; + delete l; + l = next; + } +} + +void LogFile::exit (int const exit_code) { AntiVirus::AtExit(); @@ -208,6 +227,7 @@ LogFile::endEntry() //string(theStream->str()).substr(0,theStream->rdbuf()->pcount()).c_str()); // theStream->freeze(0); delete theStream; + flush_log(); /* reset for next use */ theStream = new std::stringbuf; rdbuf (theStream); Index: LogFile.h =================================================================== RCS file: /home/max/cvsmirror/cygwin-apps-cvs/setup/LogFile.h,v retrieving revision 2.3 diff -u -p -r2.3 LogFile.h --- LogFile.h 10 Nov 2002 03:56:05 -0000 2.3 +++ LogFile.h 9 Mar 2003 00:11:47 -0000 @@ -39,4 +39,5 @@ protected: virtual void endEntry(); // the current in-progress entry is complete. private: void log_save (int babble, String const &filename, bool append); + void flush_log (); };