Feature request: human-readable timestamps in logs

Hi NSD developers,

NSD currently writes logs with unix timestamps, like this:

[1392279213] nsd[13845]: info: notify for lv. from 193.0.0.198

When reading these logs, I have to keep converting the unix timestamp to
human-readable. Could you please get NSD to optionally log directly in
human-readable timestamps of the form:

2014-02-13T03:37:02 ....

Regards,
Anand

+1

a message of 18 lines which said:

NSD currently writes logs with unix timestamps, like this:

[1392279213] nsd[13845]: info: notify for lv. from 193.0.0.198

When reading these logs, I have to keep converting the unix timestamp to
human-readable. Could you please get NSD to optionally log directly in
human-readable timestamps of the form:

Often requested for software which does the same (Squid, Nagios). The
solution I use is in the Squid FAQ. Here, for Icinga :

#!/bin/sh

tail -f /var/log/icinga/icinga.log | perl -p -e 's/^\[(.*)\]/"[". localtime($1) . "]"/e'

That there is workaround is that a good reason for not to give user an option ?

Hi,

When reading these logs, I have to keep converting the unix timestamp to
human-readable. Could you please get NSD to optionally log directly in
human-readable timestamps of the form:

Attached is a small patch we use in our tailor-made NSD RPM to achieve that.
(It's not an option though.)

Kind regards,

Lukas

(attachments)

nsd.logtime.patch (778 Bytes)

Hi,