示例#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
示例#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
示例#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
示例#4
0
文件: Remote.py 项目: Alex-Song/vmaf
    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)
示例#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)
示例#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)