[Twisted-Python] twisted.lumberjack clobbers existing logs

Itamar Shtull-Trauring twisted at itamarst.org
Mon Feb 25 12:27:33 EST 2002

Andrew Bennetts wrote:

> I considered that, but when would a log file ever want to do otherwise?

"a" also screws up seek()s, which I'll need for the remote log viewing

service. In general, "a" seems like a bad idea since its behavior is

> I'd be interested to know what a portable way to append to a file is,
> though.

# assuming "file" exists

f = open("file", "r+")

f.seek(0, 2)

see the code I checked in for a complete example.

More information about the Twisted-Python mailing list