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

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: Casey Allen Shobe, exim-users, Vincent Danen
Υ/ο: 
Αντικείμενο: Re: [exim] Logging to stderr/stdout for multilog
On Wed, 15 Feb 2006, Casey Allen Shobe wrote:

> 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.



-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book