[IPython-dev] iplogging here we go again xD

Omar Andrés Zapata Mesa andresete.chaos@gmail....
Wed Dec 29 19:05:15 CST 2010


Repository updated with suggestions and corrections.

El 29 de diciembre de 2010 18:55, Omar Andrés Zapata Mesa <
andresete.chaos@gmail.com> escribió:

> sorry the branch is this
>
> https://github.com/omazapa/ipython/blob/iplogging/IPython/utils/iplogging.py
>
> El 29 de diciembre de 2010 18:45, Omar Andrés Zapata Mesa <
> andresete.chaos@gmail.com> escribió:
>
>  Hi all,
>> I write again the module for logging restructure.
>>
>> example1:
>>
>> import iplogging
>> import logging
>> stream_handler = logging.StreamHandler()
>>
>> stream_handler.setFormatter(logging.Formatter("%(levelname)s\n%(filename)s\n%(lineno)s\n%(message)s"))
>> iplogger = iplogging.IpLogger(colors=True, ipmode=True)
>> iplogger.addHandler(stream_handler)
>> iplogger.info("info message")
>> iplogger.debug("debug message")
>>
>> colors optional, default False
>> ipmode show labels like MESSAGE:"your message here"
>> ipmode default False too.
>>
>>
>> example2:
>>
>> import iplogging
>> import logging
>> stream_handler = logging.StreamHandler()
>>
>> stream_handler.setFormatter(logging.Formatter("%(levelname)s\n%(filename)s\n%(lineno)s\n%(message)s"))
>> iplogger = iplogging.IpLogger()
>> iplogger.addHandler(stream_handler)
>> iplogger.info("info message")
>> iplogger.debug("debug message")
>>
>> without colors or ipmode is the same that to use logging
>>
>>
>>
>> --
>> 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
>>
>>
>
>
> --
> 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
>
>


-- 
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.scipy.org/pipermail/ipython-dev/attachments/20101229/8786aafc/attachment.html 


More information about the IPython-dev mailing list