Re: Feature request: coloured output

2017-02-07 Thread Philip Withnall
Hey,

On Tue, 2017-02-07 at 10:12 +, Eugene Syromyatnikov wrote:
> On Mon, Feb 6, 2017 at 3:41 PM, Philip Withnall  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.

Philip

signature.asc
Description: This is a digitally signed message part
--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: Feature request: coloured output

2017-02-07 Thread Eugene Syromyatnikov
On Mon, Feb 6, 2017 at 3:41 PM, Philip Withnall  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@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/strace-devel
>



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

--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel