File missing from last commit #4651
This commit is contained in:
parent
2e3769c7a6
commit
aac59fbf7e
|
@ -42,6 +42,9 @@ public:
|
||||||
virtual void close();
|
virtual void close();
|
||||||
virtual void show(bool showIfEmpty);
|
virtual void show(bool showIfEmpty);
|
||||||
virtual bool write(ELevel level, const char* message);
|
virtual bool write(ELevel level, const char* message);
|
||||||
|
|
||||||
|
//! @name manipulators
|
||||||
|
//@{
|
||||||
|
|
||||||
//! Same as write, but allows message to sidestep anti-recursion mechanism.
|
//! Same as write, but allows message to sidestep anti-recursion mechanism.
|
||||||
bool write(ELevel level, const char* text, bool force);
|
bool write(ELevel level, const char* text, bool force);
|
||||||
|
@ -49,7 +52,35 @@ public:
|
||||||
//! Notify that the buffer should be sent.
|
//! Notify that the buffer should be sent.
|
||||||
void notifyBuffer();
|
void notifyBuffer();
|
||||||
|
|
||||||
|
//! Set the buffer size.
|
||||||
|
/*!
|
||||||
|
Set the maximum size of the buffer to protect memory
|
||||||
|
from runaway logging.
|
||||||
|
*/
|
||||||
|
void bufferMaxSize(UInt16 bufferMaxSize);
|
||||||
|
|
||||||
|
//! Close the outputter
|
||||||
|
/*!
|
||||||
|
Close the outputter. If \p waitForEmpty is true, it will wait until
|
||||||
|
the buffer has been sent to the IPC server before closing.
|
||||||
|
*/
|
||||||
|
void close(bool waitForEmpty);
|
||||||
|
|
||||||
|
//@}
|
||||||
|
|
||||||
|
//! @name accessors
|
||||||
|
//@{
|
||||||
|
|
||||||
|
//! Get the buffer size
|
||||||
|
/*!
|
||||||
|
Returns the maximum size of the buffer.
|
||||||
|
*/
|
||||||
|
UInt16 bufferMaxSize() const;
|
||||||
|
|
||||||
|
//@}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void init();
|
||||||
void bufferThread(void*);
|
void bufferThread(void*);
|
||||||
String getChunk(size_t count);
|
String getChunk(size_t count);
|
||||||
void sendBuffer();
|
void sendBuffer();
|
||||||
|
@ -62,11 +93,14 @@ private:
|
||||||
Buffer m_buffer;
|
Buffer m_buffer;
|
||||||
ArchMutex m_bufferMutex;
|
ArchMutex m_bufferMutex;
|
||||||
bool m_sending;
|
bool m_sending;
|
||||||
Thread* m_bufferThread;
|
Thread* m_bufferThread;
|
||||||
bool m_running;
|
bool m_running;
|
||||||
ArchCond m_notifyCond;
|
ArchCond m_notifyCond;
|
||||||
ArchMutex m_notifyMutex;
|
ArchMutex m_notifyMutex;
|
||||||
bool m_bufferWaiting;
|
bool m_bufferWaiting;
|
||||||
IArchMultithread::ThreadID
|
IArchMultithread::ThreadID
|
||||||
m_bufferThreadId;
|
m_bufferThreadId;
|
||||||
|
UInt16 m_bufferMaxSize;
|
||||||
|
ArchCond m_bufferEmptyCond;
|
||||||
|
ArchMutex m_bufferEmptyMutex;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue