mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 13:45:04 +02:00
StreamLogger#BindStream(): set #m_FlushLogTimer only if needed
refs #6737
This commit is contained in:
parent
ccbe9f7fbe
commit
622f684124
@ -55,10 +55,12 @@ void StreamLogger::BindStream(std::ostream *stream, bool ownsStream)
|
|||||||
m_Stream = stream;
|
m_Stream = stream;
|
||||||
m_OwnsStream = ownsStream;
|
m_OwnsStream = ownsStream;
|
||||||
|
|
||||||
m_FlushLogTimer = new Timer();
|
if (!m_FlushLogTimer) {
|
||||||
m_FlushLogTimer->SetInterval(1);
|
m_FlushLogTimer = new Timer();
|
||||||
m_FlushLogTimer->OnTimerExpired.connect(std::bind(&StreamLogger::FlushLogTimerHandler, this));
|
m_FlushLogTimer->SetInterval(1);
|
||||||
m_FlushLogTimer->Start();
|
m_FlushLogTimer->OnTimerExpired.connect(std::bind(&StreamLogger::FlushLogTimerHandler, this));
|
||||||
|
m_FlushLogTimer->Start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user