in reply to Multiple processes, one log file?
I implemented something similar (though not using log4perl) using flock. You just get an exclusive lock on the logfile before writing, then write, then release the lock.
Before that, my experience has been that if you write less than the system block size or MAX_PIPE (4K on many systems), you can get away without locking. I'm not sure if that's guaranteed; I remember reading it once, but I've been looking for the reference for two years without finding it, so I can't say for sure. :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Multiple processes, one log file?
by cosimo (Hermit) on May 20, 2005 at 15:19 UTC |