Show More
@@ -98,38 +98,3 b' Continuing with the example above, this should illustrate this idea::' | |||||
98 | This section was written after a contribution by Alexander Belchenko on |
|
98 | This section was written after a contribution by Alexander Belchenko on | |
99 | the IPython user list. |
|
99 | the IPython user list. | |
100 |
|
100 | |||
101 | .. The section below needs to be updated for the new config system. |
|
|||
102 |
|
||||
103 | .. Effective logging |
|
|||
104 | ----------------- |
|
|||
105 |
|
||||
106 | .. A very useful suggestion sent in by Robert Kern follows: |
|
|||
107 |
|
||||
108 | .. I recently happened on a nifty way to keep tidy per-project log files. I |
|
|||
109 | made a profile for my project (which is called "parkfield"):: |
|
|||
110 |
|
||||
111 | include ipythonrc |
|
|||
112 |
|
||||
113 | # cancel earlier logfile invocation: |
|
|||
114 |
|
||||
115 | logfile '' |
|
|||
116 |
|
||||
117 | execute import time |
|
|||
118 |
|
||||
119 | execute __cmd = '/Users/kern/research/logfiles/parkfield-%s.log rotate' |
|
|||
120 |
|
||||
121 | execute __IP.magic_logstart(__cmd % time.strftime('%Y-%m-%d')) |
|
|||
122 |
|
||||
123 | .. I also added a shell alias for convenience:: |
|
|||
124 |
|
||||
125 | alias parkfield="ipython --pylab profile=parkfield" |
|
|||
126 |
|
||||
127 | .. Now I have a nice little directory with everything I ever type in, |
|
|||
128 | organized by project and date. |
|
|||
129 |
|
||||
130 | .. warning:: |
|
|||
131 |
|
||||
132 | This example uses the outdated ipythonrc-style configuration files, which no |
|
|||
133 | longer work as of IPython 0.11 |
|
|||
134 |
|
||||
135 |
|
General Comments 0
You need to be logged in to leave comments.
Login now