Feature request: coloured output

Eugene Syromyatnikov evgsyr at gmail.com
Tue Feb 7 10:12:57 UTC 2017


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.

> Thanks,
> Philip
>
> (Please include me in CC in any replies, as I’m not subscribed to the
> list.)
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Strace-devel mailing list
> Strace-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/strace-devel
>



-- 
Eugene Syromyatnikov
mailto:evgsyr at gmail.com
xmpp:esyr at jabber.{ru|org}




More information about the Strace-devel mailing list