Philipp Hörist pushed to branch master at gajim / gajim
Commits: 2377427b by lovetox at 2021-01-10T21:29:48+01:00 Add --gdebug option
Sets the G_MESSAGES_DEBUG env var so GLib debug messages are printed
- - - - -
1 changed file:
- gajim/application.py
Changes:
===================================== gajim/application.py ===================================== @@ -33,6 +33,7 @@ # You should have received a copy of the GNU General Public License # along with Gajim. If not, see http://www.gnu.org/licenses/.
+import os import time import sys from datetime import datetime @@ -140,6 +141,13 @@ def __init__(self): GLib.OptionArg.NONE, _('Open IPython shell'))
+ self.add_main_option( + 'gdebug', + 0, + GLib.OptionFlags.NONE, + GLib.OptionArg.NONE, + _('Sets an enviroment variable so GLib debug messages are printed')) + self.add_main_option( 'show-next-pending-event', 0, @@ -346,6 +354,9 @@ def _handle_local_options(self,
configpaths.init()
+ if options.contains('gdebug'): + os.environ['G_MESSAGES_DEBUG'] = 'all' + if app.get_debug_mode(): # Redirect has to happen before logging init self._cleanup_debug_logs()
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/2377427b0effc1ed3863dafe957a805c9...