[Twisted-web] atomic log write
Henrik Thostrup Jensen
thostrup at gmail.com
Fri May 25 08:20:42 EDT 2007
On 5/25/07, Manlio Perillo <manlio_perillo at libero.it> wrote:
> Since I want to write to the same log file from multiple Twisted
> processes, I need to know if the log write is atomic.
> Reading the twisted log source, I can see that the log entry is written
> using only one write, so the question is if this operation if always
> atomic, even for large buffers.
This depends on the semantics of the Posix write call. I'm not sure, but I
think the result of multiple concurrent writes is undefined. It's doubtfull
that this will work
I would probably create my own logging daemon (or use an existing logging
daemon). The easy and straghtforward solution is to log to seperate files
:-). As long as they are timestamped you can always merge them if any
analysis is needed.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-web