<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On Thu, 08 Aug 2019 20:21:50 +0000 Dmitry Bogatov <kaction@debian.org>
wrote:<br>
> <br>
> control: tags -1 +upstream<br>
> <br>
> [2019-08-07 05:13] Adam Borowski <kilobyte@angband.pl><br>
> > [...]<br>
> > > a /var/log/boot.log file is<br>
> > > generated where nothing is filtered out, so that
the file is readable<br>
> > > with "cat" or "less" (and text is colored).<br>
> ><br>
> > I don't think files in /var/log/ should be anything
but plain text -- at<br>
> > least unless colorized-logs becomes essential :รพ
and/or less defaults to<br>
> > -R. But until a solution is implemented, I agree that
leaving binaryish<br>
> > control codes intact is better than corrupting them.<br>
> <br>
> Jesse, there seems to be demand on turning-off escape
sequence filtering<br>
> in bootlogd. Can you please make it configurable?<br>
<br>
It is pretty easy to make an option for printing the escape
sequences to the log file. This will allow tools like "less" to
print the boot log with its colour codes.<br>
<br>
I'd like to point out though that with such an option enabled,
it is going to result in some weird output. If all escape
sequences are printed to the file, tools like "less" can handle
it, but other (more raw) text manipulation tools such as "head"
and "tail" will end up mangling the lines. This is partly
because escape characters include positional instructions like
'\r' for carriage-return.<br>
<br>
In other words, if we make the boot log completely unfiltered,
lines in "less" will display properly, but using "cat", "head"
or "tail" will result in mangled lines that look like this:<br>
<br>
Thu Aug 8 19:06:30 2019:<br>
[ ok ug 8 19:06:30 2019: [... starting ]<br>
<br>
<br>
I'm not sure we want to do that. Perhaps the ideal would be a
small degree of filtering to remove the positional control
characters (like '\r') while leaving the rest in to allow for
colour to be displayed?<br>
<br>
- Jesse<br>
<br>
</kilobyte@angband.pl></kaction@debian.org>
</body>
</html>