title: Python logging: different logging destination per process
body: <p>I just started to use Python logging module and I cannot understand something.</p>
  
  <p>I'm writing a script that works in the following way:</p>
  
  <p><strong>1st part</strong> (single process): it get some data to compute (it's not important how).
     Here I create a logger in the following way:</p>
  
  <pre><code>import logging
  logging.basicConfig(format='%(asctime)-6s: %(name)s - %(levelname)s - %(message)s')
  logger = logging.getLogger('Pipeline')
  logger.setLevel(logging.INFO)
  logger.warning('Pipeline started')
  </code></pre>
  
  <p>In other words I log to the screen.</p>
  
  <p><strong>2nd part</strong> (multiprocessing): I create several processes (the data analysis is really time and CPU consuming) to analyze the data found before.</p>
  
  <p>Now I would like that each process logs to a different file ONLY without logging to the screen.</p>
  
  <p>What I wrote is :</p>
  
  <pre><code>fh = logging.FileHandler('/tmp/'+multiprocessing.current_process().name+'_worker.log')
  fmt = logging.Formatter(%(asctime)-6s: %(name)s - %(levelname)s - %(message)s)
  fh.setFormatter(fmt)
  local_logger = logging.getLogger(multiprocessing.current_process().name+'_worker')
  local_logger.addHandler(fh)
  local_logger.warning(multiprocessing.current_process().name + ' (worker) Process started')
  </code></pre>
  
  <p>What I got is that each process logs to a different file but logs ALSO to the screen!</p>
  
  <p>How can I fix this?</p>