title: Logging module not writing to file
body: <p>I'm using <code>logging</code> module, and I've passed in the same parameters that I have on other jobs that are currently working:</p>
  
  <pre><code>import logging
  from inst_config import config3
  
  logging.basicConfig(
      level=logging.INFO,
      format='%(asctime)s [%(levelname)s] - %(message)s',
      filename=config3.GET_LOGFILE(config3.REQUESTS_USAGE_LOGFILE))
  logging.warning('This should go in the file.')
  
  if __name__ == '__main__':
      logging.info('Starting unload.')
  </code></pre>
  
  <p>Using this method to create the filename:</p>
  
  <pre><code>REQUESTS_USAGE_LOGFILE = r'C:\RunLogs\Requests_Usage\requests_usage_runlog_{}.txt'.format(
          CUR_MONTH)
  def GET_LOGFILE(logfile):
      """Truncates file and returns."""
      with open(logfile, 'w'):
          pass
      return logfile
  </code></pre>
  
  <p>When I run it, however, it is creating the file, and then still outputting the logging info to the console.  I'm running in <code>Powershell</code>.</p>
  
  <p>Just tried putting it inside the main statement like this:</p>
  
  <pre><code>if __name__ == '__main__':
      logging.basicConfig(
      level=logging.INFO,
      format='%(asctime)s [%(levelname)s] - %(message)s',
      filename=config3.GET_LOGFILE(config3.REQUESTS_USAGE_LOGFILE))
  
      logging.warning('This should go in the file.')
  </code></pre>
  
  <p>Still no luck.</p>