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. :)
In reply to Re: Multiple processes, one log file?
by sgifford
in thread Multiple processes, one log file?
by splinky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |