title: How do I write log messages to a log file and the console at the same time?
body: <p>Does this code write to both a log file and the console at the same time?</p>
  
  <pre><code>logFile = open("logfile.log",a)
  print &gt;&gt;logFile,message
  logFile.close()
  </code></pre>