Version française
Home     About     Download     Resources     Contact us    
Browse thread
Logging
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Michael Ekstrand <michael@e...>
Subject: Re: [Caml-list] Re: Logging
On 12/21/2010 05:16 AM, Gregory Bellier wrote:
> 2010/12/21 Sylvain Le Gall <sylvain@le-gall.net>:
>> 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