From owner-freebsd-questions@FreeBSD.ORG Thu Oct 19 18:17:25 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0C9816A412 for ; Thu, 19 Oct 2006 18:17:25 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.181]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75B0543D5E for ; Thu, 19 Oct 2006 18:17:23 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from mac.com (smtpin05-en2 [10.13.10.150]) by smtpout.mac.com (Xserve/8.12.11/smtpout11/MantshX 4.0) with ESMTP id k9JIHD7P020925; Thu, 19 Oct 2006 11:17:14 -0700 (PDT) Received: from [17.214.13.96] (a17-214-13-96.apple.com [17.214.13.96]) (authenticated bits=0) by mac.com (Xserve/smtpin05/MantshX 4.0) with ESMTP id k9JIHCRO015333; Thu, 19 Oct 2006 11:17:12 -0700 (PDT) In-Reply-To: <20061019195557.M97577@192.168.11.51> References: <20061019195557.M97577@192.168.11.51> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <70827E8F-3DFE-461A-BA05-2AB48CEF5961@mac.com> Content-Transfer-Encoding: 7bit From: Chuck Swiger Date: Thu, 19 Oct 2006 11:17:11 -0700 To: Zbigniew Szalbot X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: freebsd-questions@freebsd.org Subject: Re: having more than one process write to one log X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2006 18:17:25 -0000 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