You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import zmq, msgpack
|
|
|
|
context = zmq.Context()
|
|
socket = context.socket(zmq.PULL)
|
|
socket.bind("ipc:///tmp/pbscrape-log")
|
|
|
|
while True:
|
|
entry = msgpack.unpackb(socket.recv())
|
|
|
|
f = open("scrape.log", "a")
|
|
f.write("[%(component)s] %(timestamp)s : %(message)s\n" % entry)
|
|
f.close()
|