caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Michael Ekstrand <michael@elehack.net>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Re: Logging
Date: Tue, 21 Dec 2010 08:33:49 -0600	[thread overview]
Message-ID: <4D10BACD.7070807@elehack.net> (raw)
In-Reply-To: <AANLkTikACnAmd=7Yzuec-dmu7hnUV9U2EMdO=Bz_Nmm2@mail.gmail.com>

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


      parent reply	other threads:[~2010-12-21 14:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-21  9:51 Logging Gregory Bellier
2010-12-21 10:29 ` Logging Sylvain Le Gall
2010-12-21 11:16   ` [Caml-list] Logging Gregory Bellier
2010-12-21 11:21     ` Török Edwin
2010-12-21 11:47       ` Gabriel Kerneis
2010-12-21 14:33     ` Michael Ekstrand [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D10BACD.7070807@elehack.net \
    --to=michael@elehack.net \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).