A suggestion for an easy logger

TheSaint nobody at nowhere.net.no
Sun May 8 07:21:18 EDT 2011


Vinay Sajip wrote:

8<
> For Python 3.2 and later, it's the terminator attribute of the
> StreamHandler. See:
8<
> Unfortunately, for earlier Python versions, you'd need to subclass and
> override StreamHandler.emit() to get equivalent functionality :-(
> 
I'm with 3.2 and willing to stay :)
I was trying
==================================code==================================
>>>logging.basicConfig(format='%(message)s',terminator='',level=logging.DEBUG)                            
>>> logging.debug('here we are')
DEBUG:root:here we are                                                                                     
>>>  
==================================code==================================

First I didn't espect to see much more than my message. I agree that I'm 
very new to the module

Second the will terminator appear only to real stdout, or am I doing 
something incorrect?

Note: some word wrapping doesn't show the python shell correctly.

-- 
goto /dev/null



More information about the Python-list mailing list