On Tue, Sep 3, 2013 at 5:22 PM, Alan McKinnon <alan.mckin...@gmail.com> wrote:
> On 03/09/2013 23:03, Rich Freeman wrote:
>> 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.

The log would just contain the information - you could view it with
cat.  If you wanted to view it with colorized escape codes then you'd
use the pretty-printer.  The pretty-printer wouldn't strip out escape
codes - it would add them.  Of course, this means that the printer
would need to be able to parse the log output.

The alternative is something like journal where you load up the log
with metadata and have to use a formatting program to display it.
Arguably that is what directing escape codes to a log does - it just
isn't fielded like journal, but also somewhat easier to view without
special software.

I do agree that none of this seems terribly practical.  I think the
furthest I'd take this is just optionally stripping escape codes when
dumping to a log (tee on steroids), and leave it at that.

Rich

Reply via email to