Dnia 2013-09-03, o godz. 17:03:39 Rich Freeman <ri...@gentoo.org> napisał(a):
> 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. How would you handle progress reporting with this? Something like 'capture one thousand lines of updated percentages and merge them with a magical pretty printer'? I don't see real gain compared to what we have now. Except that now escape sequences cause that thousand lines to be just one ultimately long line with escapes in the editor. You can't strip logs out of information and then magically inject it back without having it somewhere. It just can't work. -- Best regards, Michał Górny
signature.asc
Description: PGP signature