[Twisted-Python] twisted.lumberjack clobbers existing logs

Itamar Shtull-Trauring twisted at itamarst.org
Mon Feb 25 04:50:39 EST 2002

Andrew Bennetts wrote:

> I like the twisted.lumberjack module that was recently added, but I think it
> has a small buglet.  It checks the size of the existing log file, but then
> opens it in mode "w", truncating it.
> Thus, I suggest the last line of LogFile._openFile should change from:
>         self._file = open(self.path, "w")
> to:
>         self._file = open(self.path, "a")

Actually, "a" mode is a bad idea, since according to the docs has 
inconsistent behaviour:
"on *some* Unix systems means that *all* writes append to the end of the 
file, regardless of the current seek position)."

But you're write about that. I'll fix it ASAP. Thanks for the bug report!

More information about the Twisted-Python mailing list