[IPython-dev] iplogging suggestions added
Sat Dec 11 16:37:15 CST 2010
On 2010-12-11 12:47 , Omar Andrés Zapata Mesa wrote:
> Hi all.
> All suggestion of Brian, Fernando and Mirnk was wrotte in the code.
> you can set optional colors, and default format too.
> In : from iplogging import get_logger
> In : kernel_logger=get_logger(name="kernel")
> In : kernel_logger.debug("debug code here")
> LOGGER: kernel
> LEVEL: DEBUG
> PROCESS: 5352
> FILE: <ipython-input-3-39a714ce7396>
> LINE: 1
> MESSAGE: debug code here
> In :
> In : 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.
One should not add Handlers or Formatters inside the IPython library code.
The only place one ought to add Handlers or Formatters (except for a
NullHandler) is at the main() level.
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the IPython-dev