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:
parent
cbd69ea4fb
commit
8dac2a541a
1 changed files with 9 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue