Re: [exim] Logging to stderr/stdout for multilog

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Vincent Danen
Ημερομηνία:  
Προς: exim-users
Υ/ο: Vincent Danen, Casey Allen Shobe
Αντικείμενο: Re: [exim] Logging to stderr/stdout for multilog
* Philip Hazel <ph10@???> [2006-02-16 09:34:09 +0000]:

> > I've just set up exim (4.54) for the first time on one of our servers, and am
> > running the service using tcpserver (part of daemontools), executing
> > `/usr/sbin/exim -bdf -q15m`, and this works, however I would prefer to do the
> > logging with multilog to keep the logs consistant with everything else on our
> > servers. To do this, I need exim to output lines to the stderr/out without
> > any prefixed timestamps instead of creating it's own files.
>
> This is not possible. I can't remember why -bdf was invented, but I
> don't think it was for this purpose. Note that Exim will spawn many
> subprocesses as it executes, and various file descriptors are
> manipulated (open, closed, renamed) at various stages. There is no
> attempt to preserve the original stdout (and stderr is preserved only if
> -d or -v is used). Therefore, it would be a huge undertaking to check
> this all out and make it work. At least, that's what I suspect. Since it
> seems of minority interest, the chances of it being done are rather
> small, I'm afraid.
>
> > Is there a way to do it including the redundant timestamp prefixes?
>
> Exim can log to syslog. Can you not capture it that way?
>
> The other approach that is used is to run a program that "tail"s Exim's
> log file and feeds the data to some other program.
>
> > Is there a TODO for logging to stdout?
>
> No. Firstly because nobody as ever asked for it before, and secondly for
> the reasons stated above.
>
> On Wed, 15 Feb 2006, Vincent Danen wrote:
>
> > Quite frankly, if exim can log both to a file and to syslog, then I can
> > make socklog handle the "keepable" logs and keep a single "today" log
> > written by exim itself for the sole purpose of tracking stats.
>
> Exim *can* log both to a file and to syslog. See section 48.1 of the
> manual.


This is good to hear. My suggestion to Casey then would be to maybe
invesigate socklog as a replacement for syslogd and grab the mail.*
facility and put into an exim logging dir or something (which now that I
know can be done, I'll be doing myself).

Thanks, Philip.

--
Annvix - Secure Linux Server: http://annvix.org/
"lynx -source http://linsec.ca/vdanen.asc | gpg --import"
{FEE30AD4 : 7F6C A60C 06C2 4811 FA1C A2BC 2EBC 5E32 FEE3 0AD4}
Wasting time like it was free...