Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh debug tracing with timestamp
- X-seq: zsh-users 3821
- From: Dan Nelson <dnelson@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: zsh debug tracing with timestamp
- Date: Sun, 15 Apr 2001 15:22:51 -0500
- Cc: Paul Lew <paullew@xxxxxxxxx>, zsh-users@xxxxxxxxxxxxxx
- In-reply-to: <1010415194943.ZM11223@xxxxxxxxxxxxxxxxxxxxxxx>; from "Bart Schaefer" on Sun Apr 15 19:49:43 GMT 2001
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <15065.17386.300246.739496@xxxxxxxxxxxxxxxxxxxxxxx> <1010415194943.ZM11223@xxxxxxxxxxxxxxxxxxxxxxx>
In the last episode (Apr 15), Bart Schaefer said:
> On Apr 14, 11:47pm, Paul Lew wrote:
> } Subject: zsh debug tracing with timestamp
> }
> } Any method to insert timestamp in front of the trace command turned on
> } by set -x?
>
> Yes, if you're using 3.1.6 or later. Just set PS4 using any of the usual
> prompt expansion escapes, e.g.:
>
> % PS4=': %D %T ; '
> % set -x
> % sleep 5; echo hello
> : 01-04-15 12:43 ; sleep 5
> : 01-04-15 12:43 ; echo hello
> hello
>
> If you need finer granularity, setopt promptsubst and use $SECONDS:
not needed; just use %D{%Y-%m-%d %H:%M:%S}, which will give you
seconds.
--
Dan Nelson
dnelson@xxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author