<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/100675/">http://git.reviewboard.kde.org/r/100675/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On February 18th, 2011, 9:40 a.m., <b>David Faure</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">So does this work with `less` for instance? tail -f ? Or only with `cat`? Or how do you use this?
My question is, whether we should remove the isatty check or indeed only make it configurable.</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">It will work with any tool that outputs the file contents to a terminal ( cat, less, more, tail ). The terminal interprets the color codes.
I think it's best to have it configurable so you can still open if with kate without seeing codes like: [0;34m KStandardDirs::findExe[0m:
Here's a way to grep for kErrors:
grep "\[0;31m" --color=never file.log
</pre>
<br />
<p>- Sergio Luis</p>
<br />
<p>On February 17th, 2011, 8:49 p.m., Sergio Luis Martins wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for kdelibs.</div>
<div>By Sergio Luis Martins.</div>
<p style="color: grey;"><i>Updated Feb. 17, 2011, 8:49 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The existing KDE_COLOR_DEBUG env variable enables colors for output sent to a tty.
This patch introduces a new variable, KDE_COLOR_DEBUG_ANY_FD, which enables colors sent to any file descriptor, not only terminals.
Use case:
I usually start the applications which I develop with &> application.log, and I need a fast way to read the logs and find any kError( colored red ) output quickly.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>kdecore/io/kdebug.cpp <span style="color: grey">(210a44c)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/100675/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>