Feature request: coloured output

Philip Withnall philip at tecnocode.co.uk
Tue Feb 7 10:33:56 UTC 2017


On Tue, 2017-02-07 at 10:12 +0000, Eugene Syromyatnikov wrote:
> On Mon, Feb 6, 2017 at 3:41 PM, Philip Withnall <philip at tecnocode.co.
> uk> wrote:
> > Hi,
> > 
> > I’ve got a feature request for strace: optional coloured output,
> > which
> > would use ANSI escape sequences (on supported terminals) to
> > embolden
> > and colourise various bits of the strace output to make it easier
> > to
> > read. Some suggestions for the highlighting:
> >  • De-emphasise PIDs at the start of a line by putting them in grey
> >  • Emphasise syscall names by emboldening them
> >  • Emphasise error return values by colouring them red
> > 
> > If piping through to another program, or running on a terminal
> > which
> > doesn’t support them, the escape sequences should not be used.
> As it stands, implementation of this feature whould tackle quite an
> amount of code, since printing routines are spread accross decoders.
> It could be implemented partially for preamles, return codes and some
> types (like UIDs), but not for the structure field names and inline
> comments, for example.
> Personally, I would hope that the structured output conversion would
> be finalized and merged before the thermal death of the Universe, and
> see this feature being implemented there, since in this case code
> changes would be localised in the legacy formatter.
> Otherwise, it could be implemented partially (for some preamble bits
> and return values) now and decoder-related part later.

OK, that makes sense. If I ever manage to find a free evening, I’ll see
if I can work on it. But that’s pretty unlikely.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170207/15b722e4/attachment.bin>

More information about the Strace-devel mailing list