Re: [Exim] Debugging and Timestamps (more of a feature reque…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Phil Pennock
Datum:  
To: Ben Strawson
CC: exim-users
Betreff: Re: [Exim] Debugging and Timestamps (more of a feature request!)
On 2002-02-14 at 12:33 -0000, Ben Strawson wrote:
> Is there any way to print timestamps against the debugging information
> produced with the "-d" option. I can't see it in the specification, so
> I suspect not. I guess I will have to rebuild and add it myself.


Yes.

> Would this be a sensible feature for version 4 (or more likely a 4.1
> release)?


Unix is a collection of tools which can be combined at the command-line.

As long as "exim -d" always line-buffers, even if the output isn't a
tty, then you can just pipe the output into a filter which adds the
timestamps.

# exim -d ...... 2>&1 | \
perl -MPOSIX=strftime -pe # 's/^/strftime("%H:%M:%S ",gmtime)/e'

That's the clean one, but Perl isn't the best example of a small unix
tool.  ;^)
--
Fimbul never has more than three drinks.  It goes one, two, three, three,
three.  I suggested the one, two, many, but he insists that it's only three.
    -- Ereshkigal on nanae