title: Log IPython output?
body: <p>Is there any way to make IPython's logging capability include output as well as input?  </p>
  
  <p>This is what a log file looks like currently:</p>
  
  <pre><code>#!/usr/bin/env python 
  # 2012-08-06.py 
  # IPython automatic logging file
  # 12:02 
  # =================================
  print "test"
  </code></pre>
  
  <p>I'd like to have one more line show up:</p>
  
  <pre><code>#!/usr/bin/env python 
  # 2012-08-06.py 
  # IPython automatic logging file
  # 12:02 
  # =================================
  print "test"
  # test
  </code></pre>
  
  <p>(the <code>#</code> is because I assume that is needed to prevent breaking IPython's <code>logplay</code> feature)</p>
  
  <p>I suppose this is possible using IPython notebooks, but on at least one machine I need this for, I'm limited to ipython 0.10.2.</p>
  
  <p>EDIT: I'd like to know how to set this up automatically, i.e. within the configuration file.    Right now my config looks like </p>
  
  <pre><code>from time import strftime
  import os
  logfilename = strftime('ipython_log_%Y-%m-%d')+".py" 
  logfilepath = "%s/%s" % (os.getcwd(),logfilename) 
  
  file_handle = open(logfilepath,'a') 
  file_handle.write('########################################################\n') 
  out_str = '# Started Logging At: '+ strftime('%Y-%m-%d %H:%M:%S\n') 
  file_handle.write(out_str) 
  file_handle.write('########################################################\n') 
  file_handle.close() 
  
  c.TerminalInteractiveShell.logappend = logfilepath
  c.TerminalInteractiveShell.logstart = True
  </code></pre>
  
  <p>but specifying <code>c.TerminalInteractiveShell.log_output = True</code> seems to have no affect</p>