A mechanism that I considered some time ago but never implemented might serve you. If your main log file is called /path/to/logfile, then your processes could write to /path/to/logfile.$$ where $$ is their PID. Each process would have their own log file, so no problems locking. These individual files could then be merged into /path/to/logfile at a more convenient time.
Failing that, Log::Log4Perl is highly recommended.
Alex / talexb / Toronto
Life is short: get busy!
In reply to Re: Writing to a log file without colliding
by talexb
in thread Writing to a log file without colliding
by cgraf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |