title: python3 http.server logging how to
body: <p>I have created a simple HTTP server of files in the current directory using</p>
  <pre><code>python3 -m http.server 8000
  </code></pre>
  <p>This works very well for downloading files in this directory. Logging output is directed to the terminal window -- I assume to either stdout or stderr</p>
  <p>I want to log activity through this server by writing log to a specified file.</p>
  <p>I have tried</p>
  <pre><code>python3 -m http.server 8000 &gt; log.txt 2&gt;&amp;1
  </code></pre>
  <p>But this produces an empty <code>log.txt</code>.</p>
  <p>What am I doing wrong? Is there a standard way of doing this or do I have to subclass the <code>http.server</code> class? Something like that?</p>