def onClient(self): # initialize the journal device import journal journal.remote(self.key, self.port, self.host) for idx in range(5): info = journal.debug("test-%02d" % idx).activate() info.log("test %02d: this a sample message" % idx) return
def client(host, port, sleep): # sleep for the requested amount of time import select select.select([], [], [], sleep) import journal journal.remote(port, host, mode="udp") for id in range(5): info = journal.debug("test-%02d" % id).activate() info.log("test message on channel %d" % id) return
def _client(self): import journal if self.port: print "client: sending messages to %r:%d using %r" % ( self.host, self.port, self.method) journal.remote(self.port, self.host, self.method) for idx in range(5): info = journal.debug("test-%02d" % idx).activate() info.log("%02d: this is a test" % idx) return
def createDevice(self): key = self.inventory.key host = self.inventory.host port = self.inventory.port import journal return journal.remote(key=key, port=port, host=host)
def createDevice(self): host = self.inventory.host port = self.inventory.port mode = self.inventory.mode import journal return journal.remote(port=port, host=host, mode=mode)