Jesse James ha scritto:

>> Which handler are you using?
>>
>> http://docs.python.org/lib/node410.html
>>     
>
> RotatingFileHandler.
>   

...which inherits from FileHandler, which inherits from StreamHandler, 
which is buffered.

The open() is in FileHandler.__init__... there is 'mode' and 'encoding' 
but no 'buffering' argument.

Short of changing the opened self.stream to unbuffered mode (something 
like calling setvbuf() on linux) you can try this:


class SyncRotatingFileHandler(RotatingFileHandler):
    def emit(self, *args, **kw):
        super(SyncRotatingFileHandler, self).emit(*args, **kw)
        self.flush()


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to