Skip to content
Snippets Groups Projects
Commit 10aef0ba authored by jkerdreu's avatar jkerdreu
Browse files

Log & title

	

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/trunk@2090 b32b6428-25c9-4566-ad07-03861ab6144f
parent 7dbf2429
Branches
No related tags found
No related merge requests found
......@@ -21,6 +21,7 @@
from xaal.lib import Engine,helpers
helpers.setup_console_logger("dumper")
helpers.set_console_title("xaal-dumper")
def display(msg):
msg.dump()
......
""" dumb script that display attributes change the xAAL bus"""
import xaal.lib
from xaal.lib import Engine,helpers,Message
import time
helpers.set_console_title("xaal-log")
def print_evt(msg):
if msg.is_attributes_change():
if msg.is_alive():
return
if msg.is_attributes_change() or msg.is_notify():
print("%s %s %s %s" % (time.ctime(),msg.source,msg.devtype,msg.body))
def main():
try:
eng = xaal.lib.Engine()
eng = Engine()
eng.add_rx_handler(print_evt)
eng.run()
except KeyboardInterrupt:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment