[IPython-dev] iplogging suggestions added
Omar Andrés Zapata Mesa
andresete.chaos at gmail.com
Sat Dec 11 13:47:34 EST 2010
Hi all.
All suggestion of Brian, Fernando and Mirnk was wrotte in the code.
you can set optional colors, and default format too.
https://github.com/omazapa/ipython/blob/iplogging/IPython/utils/iplogging.py
ex1:
In [1]: from iplogging import get_logger
In [2]: kernel_logger=get_logger(name="kernel")
In [3]: kernel_logger.debug("debug code here")
LOGGER: kernel
LEVEL: DEBUG
PROCESS: 5352
FILE: <ipython-input-3-39a714ce7396>
LINE: 1
MESSAGE: debug code here
ex2:
In [4]:
frontend_logger=get_logger(name="frontend",format="%(name)s\n%(levelname)s\n%(message)s\n",use_color=True)
In [3]: frontend_logger.debug("debug code here")
output in http://gfifdev.udea.edu.co/IpythonLogging2.png
Note that I put optional colors and format.
Suggestions Please.
Thanks
--
Omar Andres Zapata Mesa
Head Developer Phenomenology of Fundamental Interactions Group (Gfif)
http://gfif.udea.edu.co
Division of computer science Gfif Developers (Gfif Dev)
http://gfifdev.udea.edu.co
Systems Engineering Student
Universidad de Antioquia At Medellin - Colombia
Usuario Linux #490962
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20101211/cbbeebff/attachment.html>
More information about the IPython-dev
mailing list