Don't use dbus for logging until we get deadlock issues sorted out

This commit is contained in:
Dan Williams 2006-08-17 16:27:16 -04:00
parent 212b9a49da
commit 8b912fb9fa

View File

@ -1,4 +1,4 @@
import sys import sys, os
import logging import logging
import traceback import traceback
from cStringIO import StringIO from cStringIO import StringIO
@ -50,6 +50,10 @@ class MessageQueue:
self._idle_id = gobject.idle_add(self._log) self._idle_id = gobject.idle_add(self._log)
def _log(self): def _log(self):
# Use stderr for now until dbus issues get sorted out
use_dbus = False
if use_dbus:
if self._console == None or len(self._messages) == 0: if self._console == None or len(self._messages) == 0:
self._idle_id = 0 self._idle_id = 0
return False return False
@ -60,6 +64,12 @@ class MessageQueue:
else: else:
self._console.log(self._console_id, self._levels, self._console.log(self._console_id, self._levels,
self._messages) self._messages)
else:
for x in range(0, len(self._messages)):
level = self._levels[x]
msg = self._messages[x]
prog = os.path.basename(sys.argv[0])
sys.stderr.write("%s (%s): Level %s - %s\n" % (prog, os.getpid(), level, msg))
self._levels = [] self._levels = []
self._messages = [] self._messages = []