Philipp Hörist pushed to branch master at gajim / gajim

Commits:

1 changed file:

Changes:

  • gajim/application.py
    ... ... @@ -33,6 +33,7 @@
    33 33
     # You should have received a copy of the GNU General Public License
    
    34 34
     # along with Gajim. If not, see <http://www.gnu.org/licenses/>.
    
    35 35
     
    
    36
    +import os
    
    36 37
     import time
    
    37 38
     import sys
    
    38 39
     from datetime import datetime
    
    ... ... @@ -140,6 +141,13 @@ def __init__(self):
    140 141
                 GLib.OptionArg.NONE,
    
    141 142
                 _('Open IPython shell'))
    
    142 143
     
    
    144
    +        self.add_main_option(
    
    145
    +            'gdebug',
    
    146
    +            0,
    
    147
    +            GLib.OptionFlags.NONE,
    
    148
    +            GLib.OptionArg.NONE,
    
    149
    +            _('Sets an enviroment variable so GLib debug messages are printed'))
    
    150
    +
    
    143 151
             self.add_main_option(
    
    144 152
                 'show-next-pending-event',
    
    145 153
                 0,
    
    ... ... @@ -346,6 +354,9 @@ def _handle_local_options(self,
    346 354
     
    
    347 355
             configpaths.init()
    
    348 356
     
    
    357
    +        if options.contains('gdebug'):
    
    358
    +            os.environ['G_MESSAGES_DEBUG'] = 'all'
    
    359
    +
    
    349 360
             if app.get_debug_mode():
    
    350 361
                 # Redirect has to happen before logging init
    
    351 362
                 self._cleanup_debug_logs()