[arch-projects] [netcfg] [PATCH 1/4] Include timestamp in DEBUG message

Jouke Witteveen j.witteveen at gmail.com
Tue Jul 3 08:01:03 EDT 2012


On Tue, Jul 3, 2012 at 2:35 AM, Henrik Hallberg <henrik at k2h.se> wrote:
> On Tue, Jul 03, 2012 at 12:58:57AM +0200, Jouke Witteveen wrote:
>> On Mon, Jul 2, 2012 at 11:07 PM, Henrik Hallberg <henrik at k2h.se> wrote:
>> >  function report_debug {
>> > -    checkyesno "$NETCFG_DEBUG" && echo "DEBUG: $*" >&2
>> > +    checkyesno "$NETCFG_DEBUG" && echo "DEBUG $(date -Ins): $*" >&2
>>
>> Isn't that a bit too verbose? What about:
>> echo "DEBUG ${SECONDS}s: $*"
>
> Absolute time is useful when cross-checking with e.g. logs.  When
> looking for time thiefes among a dozen lines of output over as many
> seconds, like I did for these patches, fractions of a second were
> useful.
>
> By all means, if I ever were to do this again, it'd be easy to add the
> above then and there.
>
> / H

I see. In that case I won't include this one. It is just too verbose
and as you say, the bare seconds are of too little use.
Have you tried systemd? It is able to bundle all related logging.

Regards,
- Jouke


More information about the arch-projects mailing list