From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id DE94BBBAF for ; Tue, 21 Dec 2010 15:34:06 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Am0FAB5KEE2ty1O7/2dsb2JhbACDZJILjhlzrx6RMYEggVKBY3QEhGWJNRo X-IronPort-AV: E=Sophos;i="4.60,208,1291590000"; d="scan'208";a="92986577" Received: from elehack.net ([173.203.83.187]) by mail1-smtp-roc.national.inria.fr with ESMTP; 21 Dec 2010 15:34:04 +0100 Received: from [192.168.42.102] (unknown [68.168.162.166]) by elehack.net (Postfix) with ESMTPSA id 8C8B0C8050 for ; Tue, 21 Dec 2010 08:33:58 -0600 (CST) Message-ID: <4D10BACD.7070807@elehack.net> Date: Tue, 21 Dec 2010 08:33:49 -0600 From: Michael Ekstrand User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Re: Logging References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; le-gall:01 verbose:01 syslog:01 syslog:01 config:01 wrote:01 caml-list:01 functions:01 writes:01 ident:01 arbitrary:02 api:02 seems:03 module:03 handles:03 On 12/21/2010 05:16 AM, Gregory Bellier wrote: > 2010/12/21 Sylvain Le Gall : >> There is also Lwt_log. >> http://ocsigen.org/lwt/doc/api/Lwt_log.html > To be more verbose, I have two processes with two different effective > uid and I would like them to be able to log in the very same file and > not in /var/log/user.log but /var/log/my_project.log. That's why it's > convenient to call a daemon like syslog which handles the permissions > itself. > > It seems that Lwt_log provides functions to call the syslog daemon to > log (which the other module also does) or logs itself. In which case, > I'd have the permissions problem because the log file would have the > identity of the running process which created it. Please correct me if > I'm wrong about Lwt_log. > > How does Apache proceed ? You can specify where to log in the config > file and set it to /var/log/apache.log and it works while the process > runs with www-data identity. Apache is probably handling the concurrent writes itself. If you want to use syslog, you will need to use appropriate syslog ident and facility and configure your syslog daemon to filter those log messages to a separate file. It won't do that automatically (and doesn't let you log to arbitrary files). Otherwise, I think you'd need to write your own log daemon. - Michael