Logging
parent
53b4111c59
commit
e49a9bdef6
@ -1,3 +1,4 @@
|
||||
python log.py &
|
||||
python collect.py &
|
||||
python retrieve.py &
|
||||
python scrape.py &
|
||||
|
@ -0,0 +1,12 @@
|
||||
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()
|
Loading…
Reference in New Issue