1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
|
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2018 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.LogBuffer:
==========================================================================================================================================
|phoenix_title| **wx.LogBuffer**
==========================================================================================================================================
:ref:`wx.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:`wx.LogBuffer.Flush` method.
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html
<div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
<img id="toggleBlock-trigger" src="_static/images/closed.png"/>
Inheritance diagram for class <strong>LogBuffer</strong>:
</div>
<div id="toggleBlock-summary" style="display:block;"></div>
<div id="toggleBlock-content" style="display:none;">
<p class="graphviz">
<center><img src="_static/images/inheritance/wx.LogBuffer_inheritance.png" alt="Inheritance diagram of LogBuffer" usemap="#dummy" class="inheritance"/></center>
</div>
<script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
<map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.Log.html" title="wx.Log" alt="" coords="20,5,92,35"/> <area shape="rect" id="node2" href="wx.LogBuffer.html" title="wx.LogBuffer" alt="" coords="5,83,107,112"/> </map>
</p>
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.LogBuffer.__init__` The default constructor does nothing.
:meth:`~wx.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:`~wx.LogBuffer.GetBuffer` Returns the current buffer contains.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.LogBuffer.Buffer` See :meth:`~wx.LogBuffer.GetBuffer`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.LogBuffer(Log)
**Possible constructors**::
LogBuffer()
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).
.. 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:`~wx.LogBuffer.GetBuffer`
|