On May 8, 12:21 pm, TheSaint <nob...@nowhere.net.no> wrote:

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

You could do

logging.basicConfig(level=logging.DEBUG, format='%(message)s')

to get just the message.

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

The terminator is an attribute on the StreamHandler instance, so works
with whatever stream the handler is using. You can't use basicConfig()
directly, if you want to configure the terminator - instead, use
something like

sh = logging.StreamHandler(sys.stdout)
sh.terminator = ''
logging.getLogger().addHandler(sh)

but be sure to execute this code one time only, or you will get
multiple identical messages for a single logging call.

Regards,

Vinay Sajip
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to