Esempio n. 1
0
        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
Esempio n. 2
0
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
Esempio n. 3
0
    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
Esempio n. 4
0
    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)
Esempio n. 5
0
    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)
Esempio n. 6
0
    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)