[zeromq-dev] Pub/sub for a logger and multiprocessing

Frédéric fma at gbiloba.org
Fri Jul 22 17:56:18 CEST 2016


I'm new to zeromq. I plan to use it for my multi-legs robot python
framework (Py4bot¹).

As a first exercise, 

I wrote a custom logger which is a singleton, and shared accross the
application. As I'm switching from threads to processes, I'm trying to use
the zmq logger handler PUBHandler, to be able to remotly receive logs from
all processes, but it does not work out-of-the box in my case...

In the the logger __init__() method, I create a sub-process and
instanciate a zmq forwarder device, as explained here:


so this device is only created once, at the first call to the logger.

Then, in my app, I create sub-processes using python
multiprocessing.Process class. but I get a zmq error:

¹ http://www.py4bot.org


More information about the zeromq-dev mailing list