having more than one process write to one log

2006-10-19 Thread Zbigniew Szalbot

Hello,

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?


Thank you!

--
Zbigniew Szalbot
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: having more than one process write to one log

2006-10-19 Thread Eric

Zbigniew Szalbot wrote:

Hello,

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?




isnt that the default? right now i see postfix, dovecot, amavisd, etc 
all log to /var/log/maillog


Eric
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: having more than one process write to one log

2006-10-19 Thread Philip Hallstrom
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?


fopen() seems to say it's okay...

 ``a''   Open for writing.  The file is created if it does not
exist.  The stream is positioned at the end of the file.  Subsequent
writes to the file will always end up at the then current end of file,
irrespective of any intervening fseek(3) or similar.


Another idea is to use syslog

-philip
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: having more than one process write to one log

2006-10-19 Thread Chuck Swiger

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...


--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: having more than one process write to one log

2006-10-19 Thread Bill Moran
In response to Zbigniew Szalbot [EMAIL PROTECTED]:

 Hello,
 
 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?

That's what syslogd is for.

-- 
Bill Moran
Collaborative Fusion Inc.


IMPORTANT: This message contains confidential information and is
intended only for the individual named. If the reader of this
message is not an intended recipient (or the individual
responsible for the delivery of this message to an intended
recipient), please be advised that any re-use, dissemination,
distribution or copying of this message is prohibited. Please
notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The
sender therefore does not accept liability for any errors or
omissions in the contents of this message, which arise as a
result of e-mail transmission.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: having more than one process write to one log

2006-10-19 Thread Zbigniew Szalbot

Hi there,

On Thu, 19 Oct 2006, Eric 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?


isnt that the default? right now i see postfix, dovecot, amavisd, etc all log 
to /var/log/maillog


With the exception that my exim writes to /var/log/exim/mainlog which I am 
ok with, logs are rotated, etc. My question was whether it is ok for 
dovecot to join the party.


Still new to FBSD and that's why I am not sure if the way I would like to 
set it up is OK. If it is not, then I have no problem keeping logs 
separate. I could direct exim's logging to /var/log/maillog (this I can do 
:) but then I wonder if I didn't have to edit the global crontab to take 
care of logs being rotated, etc.?


Thanks to all who have responded!


--
Zbigniew Szalbot
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]