| 49 | } |
| 50 | |
| 51 | void StreamLogger::BindStream(std::ostream *stream, bool ownsStream) |
| 52 | { |
| 53 | ObjectLock olock(this); |
| 54 | |
| 55 | if (m_Stream && m_OwnsStream) |
| 56 | delete m_Stream; |
| 57 | |
| 58 | m_Stream = stream; |
| 59 | m_OwnsStream = ownsStream; |
| 60 | |
| 61 | if (!m_FlushLogTimer) { |
| 62 | m_FlushLogTimer = Timer::Create(); |
| 63 | m_FlushLogTimer->SetInterval(1); |
| 64 | m_FlushLogTimer->OnTimerExpired.connect([this](const Timer * const&) { FlushLogTimerHandler(); }); |
| 65 | m_FlushLogTimer->Start(); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Processes a log entry and outputs it to a stream. |
nothing calls this directly
no test coverage detected