Don't use dbus for logging until we get deadlock issues sorted out
This commit is contained in:
parent
212b9a49da
commit
8b912fb9fa
@ -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,17 +50,27 @@ class MessageQueue:
|
|||||||
self._idle_id = gobject.idle_add(self._log)
|
self._idle_id = gobject.idle_add(self._log)
|
||||||
|
|
||||||
def _log(self):
|
def _log(self):
|
||||||
if self._console == None or len(self._messages) == 0:
|
# Use stderr for now until dbus issues get sorted out
|
||||||
self._idle_id = 0
|
use_dbus = False
|
||||||
return False
|
|
||||||
|
|
||||||
if isinstance(self._console, dbus.Interface):
|
if use_dbus:
|
||||||
self._console.log(self._console_id, self._levels,
|
if self._console == None or len(self._messages) == 0:
|
||||||
self._messages, timeout = 1000)
|
self._idle_id = 0
|
||||||
|
return False
|
||||||
|
|
||||||
|
if isinstance(self._console, dbus.Interface):
|
||||||
|
self._console.log(self._console_id, self._levels,
|
||||||
|
self._messages, timeout = 1000)
|
||||||
|
else:
|
||||||
|
self._console.log(self._console_id, self._levels,
|
||||||
|
self._messages)
|
||||||
else:
|
else:
|
||||||
self._console.log(self._console_id, self._levels,
|
for x in range(0, len(self._messages)):
|
||||||
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 = []
|
||||||
self._idle_id = 0
|
self._idle_id = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user