.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2017 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.LogGui:

==========================================================================================================================================
|phoenix_title|  **wx.LogGui**
==========================================================================================================================================

This is the default log target for the GUI wxWidgets applications.          

Please see :ref:`Logging Customization <logging customization>`  for explanation of how to change the default log target. 

An object of this class is used by default to show the log messages created by using :ref:`wx.LogMessage`, :ref:`wx.LogError`  and other logging functions. It doesn't display the messages logged by them immediately however but accumulates all messages logged during an event handler execution and then shows them all at once when its :meth:`~wx.LogGui.Flush`  method is called during the idle time processing. This has the important advantage of showing only a single dialog to the user even if several messages were logged because of a single error as it often happens (e.g. a low level function could log a message because it failed to open a file resulting in its caller logging another message due to the failure of higher level operation requiring the use of this file). If you need to force the display of all previously logged messages immediately you can use :meth:`wx.Log.FlushActive`   to force the dialog display. 

Also notice that if an error message is logged when several informative messages had been already logged before, the informative messages are discarded on the assumption that they are not useful  

At any rate, it is possible that that several messages were accumulated before this class :meth:`~wx.LogGui.Flush`  method is called. If this is the case, :meth:`~wx.LogGui.Flush`  uses a custom dialog which shows the last message directly and allows the user to view the previously logged ones by expanding the "Details" :ref:`wx.CollapsiblePane`  inside it. This custom dialog also provides the buttons for copying the log messages to the clipboard and saving them to a file. 

However if only a single message is present when :meth:`~wx.LogGui.Flush`  is called, just a :ref:`wx.MessageBox`  is used to show it. This has the advantage of being closer to the native behaviour but it doesn't give the user any possibility to copy or save the message (except for the recent Windows versions where  ``Ctrl-C``   may be pressed in the message box to copy its contents to the clipboard) so you may want to override DoShowSingleLogMessage() to customize  :ref:`wx.LogGui`   









|

|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>LogGui</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.LogGui_inheritance.png" alt="Inheritance diagram of LogGui" 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="12,5,84,35"/> <area shape="rect" id="node2" href="wx.LogGui.html" title="wx.LogGui" alt="" coords="5,83,91,112"/> </map> 
   </p>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.LogGui.__init__`                                                      Default constructor.
:meth:`~wx.LogGui.Flush`                                                         Presents the accumulated log messages, if any, to the user.
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.LogGui(Log)

   **Possible constructors**::

       LogGui()
       
   
   This is the default log target for the GUI wxWidgets applications.



   .. method:: __init__(self)

      Default constructor.                   





   .. method:: Flush(self)

      Presents the accumulated log messages, if any, to the user.                  

      This method is called during the idle time and should show any messages accumulated in ``LogGui.m_aMessages``  field to the user.                   




