[IPython-user] Stupid log tricks

Robert Kern rkern at ucsd.edu
Tue Jun 28 12:53:44 CDT 2005


I recently happened on a nifty way to keep tidy per-project log files. I 
made a profile for my project (which is called "parkfield").

include ipythonrc
logfile ''  # cancel earlier logfile invocation
execute import time
execute __cmd = '/Users/kern/research/logfiles/parkfield-%s.log rotate'
execute __IP.magic_logstart(__cmd % time.strftime('%Y-%m-%d'))

I also added a shell alias for convenience:

alias parkfield="ipython -pylab -profile parkfield"

Now I have a nice little directory with everything I ever type in, 
organized by project and date.

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter




More information about the IPython-user mailing list