sugar-toolkit-gtk3/sugar/session/LogWriter.py
2006-05-16 19:23:42 -04:00

15 lines
367 B
Python

import dbus
class LogWriter:
def __init__(self, application):
self._application = application
bus = dbus.SessionBus()
proxy_obj = bus.get_object('com.redhat.Sugar.Logger', '/com/redhat/Sugar/Logger')
self._logger = dbus.Interface(proxy_obj, 'com.redhat.Sugar.Logger')
def write(self, s):
try:
self._logger.log(self._application, s)
except:
pass