.. include:: headings.inc .. _LogBuffer: ========================================================================================================================================== |phoenix_title| **LogBuffer** ========================================================================================================================================== :ref:`LogBuffer` is a very simple implementation of log sink which simply collects all the logged messages in a string (except the debug messages which are output in the usual way immediately as we're presumably not interested in collecting them for later). The messages from different log function calls are separated by the new lines. All the messages collected so far can be shown to the user (and the current buffer cleared) by calling the overloaded :meth:`LogBuffer.Flush` method. | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **LogBuffer** .. raw:: html

Inheritance diagram of LogBuffer

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~LogBuffer.__init__` The default constructor does nothing. :meth:`~LogBuffer.Flush` Shows all the messages collected so far to the user (using a message box in the GUI applications or by printing them out to the console in text mode) and clears the internal buffer. :meth:`~LogBuffer.GetBuffer` Returns the current buffer contains. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~LogBuffer.Buffer` See :meth:`~LogBuffer.GetBuffer` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: LogBuffer(Log) LogBuffer is a very simple implementation of log sink which simply collects all the logged messages in a string (except the debug messages which are output in the usual way immediately as we're presumably not interested in collecting them for later). **Possible constructors**:: LogBuffer() .. method:: __init__(self) The default constructor does nothing. .. method:: Flush(self) Shows all the messages collected so far to the user (using a message box in the GUI applications or by printing them out to the console in text mode) and clears the internal buffer. .. method:: GetBuffer(self) Returns the current buffer contains. Messages from different log function calls are separated with the new lines in the buffer. The buffer can be cleared by :meth:`Flush` which will also show the current contents to the user. :rtype: `string` .. attribute:: Buffer See :meth:`~LogBuffer.GetBuffer`