change the semantics of EventLog "clearing"

use the smart-ptr semantics to just detach from the log.
This allows other entities still to hold onto a joined log
This commit is contained in:
Fischlurch 2016-02-14 00:56:52 +01:00
parent cbd69ea4fb
commit 8dac2a541a

View file

@ -648,11 +648,18 @@ namespace test{
return this->clear (originalLogID);
}
/** purge log contents and also reset Header-ID */
/** purge log contents and also reset Header-ID
* @note actually we're starting a new log
* and let the previous one go away.
* @warning while this also unties any joined logs,
* other log front-ends might still hold onto
* the existing, combined log. Just we are
* detached and writing to a pristine log.
*/
EventLog&
clear (string alteredLogID)
{
log_->clear();
log_.reset (new Log);
log({"type=EventLogHeader", "this="+alteredLogID});
return *this;
}