Mercurial > code > home > repos > light9
changeset 806:6d8f0c088a26
logging and notes
Ignore-this: 341ae9d2e6b7247a05a72646914a48ab
author | drewp@bigasterisk.com |
---|---|
date | Wed, 18 Jul 2012 18:07:49 +0000 |
parents | 54732a2f9935 |
children | 3fe281a3be70 |
files | bin/rdfdb light9/dmxclient.py |
diffstat | 2 files changed, 19 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/rdfdb Wed Jul 18 10:09:29 2012 +0000 +++ b/bin/rdfdb Wed Jul 18 18:07:49 2012 +0000 @@ -65,6 +65,14 @@ } maybe use some http://json-ld.org/ in there. +proposed rule feature: +rdfdb should be able to watch a pair of (sourceFile, rulesFile) and +rerun the rules when either one changes. Should the sourceFile be able +to specify its own rules file? That would be easier +configuration. How do edits work? Not allowed? Patch the source only? +Also see the source graph loaded into a different ctx, and you can +edit that one and see the results in the output context? + Our web ui: registered clients @@ -74,10 +82,12 @@ and keep updating the same data (e.g. a stream of changes as the user drags a slider) and collapse them into a single edit for clarity. -proposed rule feature: -rdfdb should be able to watch a pair of (sourceFile, rulesFile) and -rerun the rules when either one changes. Should the sourceFile be able -to specify its own rules file? That would be easier configuration. +Ways to display patches, using labels and creator/subj icons where possible: + + <creator> set <subj>'s <p> to <o> + <creator> changed <subj>'s <pred> from <o1> to <o2> + <creator> added <o> to <s> <p> + """ from twisted.internet import reactor
--- a/light9/dmxclient.py Wed Jul 18 10:09:29 2012 +0000 +++ b/light9/dmxclient.py Wed Jul 18 18:07:49 2012 +0000 @@ -4,9 +4,10 @@ client id is formed from sys.argv[0] and the PID. """ -import xmlrpclib, os, sys, socket, time +import xmlrpclib, os, sys, socket, time, logging from light9 import networking _dmx=None +log = logging.getLogger('dmxclient') procname = os.path.basename(sys.argv[0]) procname = procname.replace('.py', '') @@ -34,14 +35,14 @@ try: _dmx.outputlevels(clientid, levellist) except socket.error, e: - print "dmx server error %s, waiting" % e + log.error("dmx server error %s, waiting" % e) time.sleep(1) except xmlrpclib.Fault,e: - print "outputlevels had xml fault: %s" % e + log.error("outputlevels had xml fault: %s" % e) time.sleep(1) else: def err(error): - print "dmx server error", error + log.error("dmx server error %s", error) time.sleep(1) d = _dmx.callRemote('outputlevels', clientid, levellist) d.addErrback(err)