title: Python Service launched with Popen have logging stderr & stdout redirection problems
body: <p>I want log all from my service, I'm launching it with:</p>
  
  <p>launcher.py:</p>
  
  <pre><code>subprocess.Popen(['myservice.py'])
  </code></pre>
  
  <p>service.py:</p>
  
  <pre><code>import logging
  log = logging.getLogger(__name__)
  log.setLevel(logging.DEBUG)
  handler = logging.FileHandler('/var/log/myservice.log')
  handler.setLevel(logging.DEBUG)
  formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
  handler.setFormatter(formatter)
  log.addHandler(handler)
  .....
  </code></pre>
  
  <p>But the problem is that stdout and stderr aren't writing in myservice.log</p>
  
  <p>I was testing with:</p>
  
  <pre><code>with open("/var/log/myservice_out.log","w+") as out, open("/var/log/myservice_err.log","w+") as err:
          subprocess.Popen(['myservice.py'],stdout=out,stderr=err)
  </code></pre>
  
  <p>But this isn't using logging, and I want to log all messages(stderror,stdout) in only one file.<br>Thanks in advance.</p>