You will need to import zerosmq in your nodes. After that, you should call zerosmq.init(LABEL), replacing LABEL by a string which will appear on any message sent by that node to log(msg). LABEL should be different for each node.


You can use sys.argv[0] for LABEL, which will tag messages with the filename of the script (note that this will not work as intended if you run multiple instances of the same script in parallel).