title: python logging only to file
body: <p>I have a cronjob running a python script which I added a <code>logging</code> to, but since it's a daily job it is really annoying that I get daily emails of it's function, but I can't seem to find a setting, that will make it log only into the logfile.    </p>
  
  <pre><code>#!/usr/bin/python
  import logging, logging.handlers
  LOGFILENAME = "log.log" 
  logging.basicConfig()
  log = logging.getLogger("nameoflog")
  log.setLevel(logging.DEBUG) 
  handler = logging.handlers.WatchedFileHandler(LOGFILENAME)
  handler.setLevel(logging.DEBUG)
  handler.setFormatter(logging.Formatter("%(asctime)-15s %(levelname)-8s %(name)s %(message)s")) 
  log.addHandler(handler)
  log.info("something happening")
  </code></pre>
  
  <p>How is it possible to make <code>logging</code> only write to a file and not to file and <code>STDOUT</code>?</p>