title: How to use logging library? (Implement logging in Python)
body: <p>I would like to apply <code>logging</code> library in a class to get reports from the different steps in my code and use <code>info</code>, <code>debug</code> or <code>error</code> functions and keep it in a logging file. In addition I want to use <code>multiprocessing</code> in my code as well. But I could not quite figure out how it works and should be set up, plus I have used it in a code and defined it as following</p>
  
  <pre><code>import logging 
  
  logging.basicConfig(filename='logfile.log',level=logging.DEBUG)
  </code></pre>
  
  <p>it halted the code and prevents to terminate the process. I am wondering how it should be used in a class and stopped and closed the log file?!! 
  Any help would be appreciated...  </p>