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

Discussion in 'Python' started by Chris Seberino, Aug 21, 2010.

  1. 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?
    Chris Seberino, Aug 21, 2010
    #1
    1. Advertising

  2. Chris Seberino

    Peter Otten Guest

    Re: logging module -> Miss messages if don't flush constantly? How set to flush constantly?

    Chris Seberino wrote:

    > 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
    Peter Otten, Aug 21, 2010
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    315
  2. Christoph Haas
    Replies:
    0
    Views:
    440
    Christoph Haas
    Jun 12, 2006
  3. Christoph Haas
    Replies:
    1
    Views:
    450
    Vinay Sajip
    Jun 14, 2006
  4. Ryan Olshan
    Replies:
    1
    Views:
    342
    Alvin Bruney [MVP]
    Feb 4, 2007
  5. Fayaz Yusuf Khan
    Replies:
    4
    Views:
    226
    Vinay Sajip
    Feb 23, 2012
Loading...

Share This Page