

# Make the thread a Daemon Thread (program will exit when only daemon

Setup the object with a logger and a loglevel The object itself is able to supply a file

To a logger (see python's logger module), Read text message from a pipe and redirect them To solve this problem I wrote the following code which basically creates a pipe and uses a thread to read from the pipe and generates a log message using the Python logging method: import subprocess I did not find any other method, but if there is one please let me know! The difficulty I faced is that with subprocess I can redirect stdout and stderr only using a file descriptor. The subprocess is created using the subprocess.call() method. I'm working on a Python script and I was searching for a method to redirect stdout and stderr of a subprocess to the logging module.
