having more than one process write to one log

Chuck Swiger cswiger at mac.com
Thu Oct 19 18:17:25 UTC 2006

On Oct 19, 2006, at 10:58 AM, Zbigniew Szalbot wrote:
> I will appreciate your advice. Is it possible and *safe* to allow  
> two different processes (dovecot and exim) to write to one log?  
> Better not do it? I would like to have both data in one log but...  
> don't want to cause problems. I don't think Windows would allow it.  
> How about FBSD?

Those things normally use syslog to write via the LOG_MAIL facility  
to /var/log/maillog.  Syslog-based logging will handle logging from  
multiple programs to just one logfile just fine.

Otherwise, you are advised to look into fsync() and flock().  Those  
syscalls do not necessarily work on remote filesystems, however...


More information about the freebsd-questions mailing list