<br><br><div class="gmail_quote">2010/12/7 Omar Andrés Zapata Mesa <span dir="ltr"><<a href="mailto:andresete.chaos@gmail.com">andresete.chaos@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Then, should  I use std logging instead iplogging?<div>with iplogging we can create objects to startup scripts and appropriate Handlers, </div><div>ex: in The IPython kernel main entry point, we can parser some arguments to enable o disable </div>



<div>iplogging messages and we can create an object that save information into log file.</div></blockquote><div><br></div><div>You can just put the startup lines at the bottom of iplogging inside a make_logger() function, then that function can be called from entry_point (or put in entry_point).</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><br></div><div>Thanks!!</div><div><br></div><div><br></div><div> </div><div><div class="gmail_quote">

2010/12/7 Brian Granger <span dir="ltr"><<a href="mailto:ellisonbg@gmail.com" target="_blank">ellisonbg@gmail.com</a>></span><div><div></div><div class="h5"><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br><div class="gmail_quote"><div>On Tue, Dec 7, 2010 at 1:23 PM, MinRK <span dir="ltr"><<a href="mailto:benjaminrk@gmail.com" target="_blank">benjaminrk@gmail.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br><div class="gmail_quote"><div>On Tue, Dec 7, 2010 at 13:05, Brian Granger <span dir="ltr"><<a href="mailto:ellisonbg@gmail.com" target="_blank">ellisonbg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">






A few quick comments:<div><br></div><div>* The configuration of logging for each process should be done at the Application level, not in a ipython specific logging module.  When I get to creating a full blown Application for the new kernel, etc., we can put all of this together.  We may want an IPython Logger Configurable that holds the state and config for the Application.  Subclasses could log to different resources (file, zeromq socket, etc).</div>







<div>* Files that need to use logging should just import the standard logging module and start logging.</div><div>* For now, if the goal is to move forward with the 2 process terminal based IPython, I would: </div></blockquote>






<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br>
</div><div>1) Convert the kernel to use the logging module of the std library.</div><div>2) Make the kernel log to a file in the ipython directory.  For now this can just be done in the top level kernel script.</div><div>







<br></div><div>Cheers,</div><div><br></div><div>Brian</div></blockquote><div><br></div></div><div><div>This is exactly what the parallel code currently does.  Any use/knowledge of logging over zmq or to a file</div>

<div>is handled purely by the startup scripts in creating/attaching appropriate Handler objects.</div></div><div><br></div></div></blockquote><div><br></div></div><div>Great, this is the model that we talked about at SciPy with Justin Riley and I think it is a good one.</div>



<div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div></div><div>Omar's iplogging is not a special logging module, it's just a logging.Formatter subclass with coloring, for use with regular logging.Loggers.</div>






<div><br></div></div></blockquote><div><br></div></div><div>Yes, but all the configuration of the Formatters and Handlers can be done in the main startup script so that most modules only need to import logging, rather than iplogging.</div>




<div><br></div><div>Cheers,</div><div><br></div><font color="#888888"><div>Brian</div></font><div><div></div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div class="gmail_quote"><div></div><font color="#888888"><div>
-MinRK</div></font><div><div></div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div></div><div><br><br><div class="gmail_quote">
On Mon, Dec 6, 2010 at 2:59 PM, Fernando Perez <span dir="ltr"><<a href="http://fperez.net" target="_blank">fperez.net</a>@<a href="http://gmail.com" target="_blank">gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi folks,<br>
<br>
I just had a chat with Omar, who has some spare cycles coming up and<br>
is going to complete the work he prototyped during the gsoc effort.<br>
This will mean producing a terminal-based, 2-process version of<br>
IPython, which can be used for talking to existing kernels or with its<br>
own self-started one.<br>
<br>
Unfortunately right now the self-starting approach simply won't work,<br>
because we've crammed the kernel full of direct print statements to<br>
log message info.  This makes it impossible to use the terminal where<br>
the kernel is running, as it floods with messages.<br>
<br>
I suggested to Omar that he start, as step 1 of his work, with<br>
quieting out the kernel, but I'd like to ping everyone with this so<br>
that Omar can implement something that will last.  I remember in Min's<br>
newparallel branch we already have a proper log listener, and we'd<br>
talked in the past about this a little, but my memory fails me.<br>
<br>
So, should all print statements be replaced with calls to a<br>
logging.logger object for now?  Min, how was your code logging its<br>
messages out?<br>
<br>
This isn't particularly difficult work, I just want to make sure we<br>
use the same strategy everywhere, and right now I don't have all the<br>
pieces of the puzzle in my mental cache...<br>
<br>
Thanks!<br>
<br>
f<br>
_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org" target="_blank">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</blockquote></div><br><br clear="all"><br></div></div>-- <br>Brian E. Granger, Ph.D.<br>Assistant Professor of Physics<br>Cal Poly State University, San Luis Obispo<br><a href="mailto:bgranger@calpoly.edu" target="_blank">bgranger@calpoly.edu</a><br>







<a href="mailto:ellisonbg@gmail.com" target="_blank">ellisonbg@gmail.com</a><br>
</div>
<br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org" target="_blank">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div></div></div><br>
</blockquote></div></div></div><div><div></div><div><br><br clear="all"><br>-- <br>Brian E. Granger, Ph.D.<br>Assistant Professor of Physics<br>Cal Poly State University, San Luis Obispo<br><a href="mailto:bgranger@calpoly.edu" target="_blank">bgranger@calpoly.edu</a><br>




<a href="mailto:ellisonbg@gmail.com" target="_blank">ellisonbg@gmail.com</a><br>
</div></div><br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org" target="_blank">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div></div></div><br><br clear="all"><br><br>
</div>
</blockquote></div><br>