Commit 2377427b authored by Philipp Hörist's avatar Philipp Hörist

Add --gdebug option

Sets the G_MESSAGES_DEBUG env var so GLib debug messages are printed
parent 6b53f794
Pipeline #7093 failed with stages
in 9 minutes and 7 seconds
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment