On 03/09/2013 23:03, Rich Freeman wrote:
> On Tue, Sep 3, 2013 at 4:41 PM, Alan McKinnon <alan.mckin...@gmail.com> wrote:
>> The solution is obvious - default to writing plain text to log files and
>> give the user an option to enable escapes in the log if {s,}he chooses
>> to have it. This does mean you can't use tricks with tee.
> 
> Not sure it is so obvious.
> 
> Log files are about capturing information.  Escapes are about the
> presentation of information - a reporting feature not unlike
> pagination/etc.  It wouldn't make sense to embed page numbers in a log
> file - if they are desired they should be added at the time the
> information is presented, just like escape sequences.
> 
> It seems to me that the cleaner situation would be to capture
> information in the logs, and use a pretty-printer of some kind to make
> it look nice.  Terminate output should be made to look nice when
> directed at a terminal.

This implies that the log can only then be viewed with a pretty-printer.

I wouldn't want to be the maintainer that has to deal with outraged
users if that becomes the case.

> Of course, the ultimate result of the whole logs-are-information
> concept is something like the systemd journal, but I won't go there.
> I'm not sure that would really help here - the challenge is more about
> the actual content and not the metadata.

So do what we've always done in Unix-land: leave the decision up to the
user. Build logs can always be regenerated (run emerge again) if the
ANSI sequences truly are vital whilst troubleshooting a specific log.
And we already do this for localized logs if the dev can't make sense of
non-English messages. It only becomes a problem if the log is for one of
that small number of loooooong builds (libreoffice, kdelibs etc)

-- 
Alan McKinnon
alan.mckin...@gmail.com


Reply via email to