[arch-projects] [netcfg] [PATCH 1/4] Include timestamp in DEBUG message
Henrik Hallberg
henrik at k2h.se
Mon Jul 2 20:35:56 EDT 2012
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
More information about the arch-projects
mailing list