def zlogger(config, sender):
    from Queue import Queue
    from threading import Thread
    logq = Queue()
    slog = Zero(ZeroSetup('push', 'tcp://%(host)s:%(port)s' % config).nonblocking())

    def thread(slog=slog):
        for t in iter(logq.get, ''):
            slog(t)
    t = Thread(target=thread)
    t.daemon = True
    t.start()
    return ZLogger(config, logq, sender, gethostname())
Convenience function for setting up a ZLogger and queue. Returns a ZLogger
dataset/ETHPy150Open philipbergen/zero/py/zlog.py/zlogger