Relative Content

Tag Archive for pythonmultithreadingtkinterloggingmultiprocessing

How to share a configured logger between running processes?

I’m trying to build a small GUI app with a logger that will, at some point, be doing some time consuming manipulation of multiple sets of data (up to several hundred). Naturally, I wanted to use multiprocessing to help speed things up a bit. I was following the example given in the Logging Cookbook (second example) in the Python docs and trying to figure out how to work it into my code. In this stripped down minimal example, clicking the build button should simply log a few messages. The problem, which is hopefully obvious to someone more learned in the topics at hand, is that it doesn’t work as intended. The application only prints 3 of the 5 messages to the console and exactly zero are added to the log file.