Forgot to add new file
This commit is contained in:
parent
8a9d0b657c
commit
53ccec5267
14
sugar/session/LogWriter.py
Normal file
14
sugar/session/LogWriter.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
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
|
@ -1,4 +1,5 @@
|
|||||||
sugardir = $(pythondir)/sugar/session
|
sugardir = $(pythondir)/sugar/session
|
||||||
sugar_PYTHON = \
|
sugar_PYTHON = \
|
||||||
__init__.py \
|
__init__.py \
|
||||||
session.py
|
session.py \
|
||||||
|
LogWriter.py
|
||||||
|
Loading…
Reference in New Issue
Block a user