logging module -> Miss messages if don't flush constantly? How set toflush constantly?

C

Chris Seberino

It looks like I can miss some logging messages if I don't flush after
every one....is that true?

This is an issue when program crashes so that logger didn't get a
chance to print everything.

Is there some way to set logging to constantly flush?
 
P

Peter Otten

Chris said:
It looks like I can miss some logging messages if I don't flush after
every one....is that true?

As far as I can tell from the 2.6 source the StreamHandler does flush after
each record.

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,436
Messages
2,571,696
Members
48,796
Latest member
Greg L.
Top