4 @code{stderr} of the running targets can be kept on the disk by
5 specifying @option{-k} option (or by setting @env{$REDO_LOGS=1}
6 environment variable) to @command{redo}. You can simultaneously
7 use also @option{-s} option (@env{$REDO_SILENT=1} environment variable)
8 to silence @code{stderr} output, but still keeping it on the disk for
9 possible further debug investigation. @strong{Only} the latest build is
10 kept, previous one is overwritten.
13 $ redo -xx -k -s build-the-whole-huge-project
16 Logs are stored in corresponding @file{.redo/tgt.log} file. Each line of
17 it is prefixed with @url{http://cr.yp.to/libtai/tai64.html, TAI64N}
18 timestamp, that you can decode with @command{tai64nlocal} utility from
19 @url{http://cr.yp.to/daemontools.html, daemontools}, or similar one:
20 @code{go get go.cypherpunks.ru/tai64n/cmd/tai64nlocal}.
22 When @option{-k} is in use, all environment variables, working
23 directory, command line arguments, start/finish times, duration,
24 participated PIDs, return codes are also saved in corresponding
25 @file{.redo/tgt.log.reg} file.
27 You can view any target's output with @command{redo-log} command
28 (possibly piping to @command{tai64nlocal}). @option{-c} option also
29 shows how exactly it was started, when started/finished and how long did
32 @option{-r} option enables recursive serialized indented output. When
33 you run @command{redo} in parallel, then all @code{stderr} (if no
34 @option{-s}ilence was enabled) is printed as it appears, mixing output
35 from all commands, that is hard to read and investigate. Serialized
36 @command{redo-log} output rearranges output. I will take example from
37 original apenwarr's idea @url{https://apenwarr.ca/log/20181106,
38 article}. Serialized output will look like this:
46 J: > redo-ifchange X Y
53 Z: > > > ...Z stuff...
55 Y: > > ...more Y stuff...
57 J: > ...more J stuff...
62 It will output depth first logs. It can rearrange some "events" (redo
63 invocations): failed targets will be at the very end, because they are
64 the most interesting ones for the human.
66 Pay attention that recursive output is more CPU hungry. Single target
67 output is literally copying of @file{.redo/tgt.log} file to @code{stdout}.