Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: rfc: escape sequences in logs
Date: Tue, 03 Sep 2013 12:37:07
Message-Id: pan$70fa7$fbb8881c$aab6e9cf$23a04150@cox.net
1 Kent Fredric posted on Tue, 03 Sep 2013 11:59:13 +1200 as excerpted:
2
3 > And it is quite simple to remove escape sequences from log files if I
4 > desire it.
5 >
6 > using: app-text/ansifilter
7 >
8 > zcat
9 > /var/log/portage/build/app-accessibility/at-spi2-
10 core-2.6.3:20130825-143158.log.gz
11 > | ansifilter
12 >
13 > using perl and Term::ANSIColor ( standard issue with Perl itself )
14 >
15 > zcat
16 > /var/log/portage/build/app-accessibility/at-spi2-
17 core-2.6.3:20130825-143158.log.gz
18 > | perl -MTerm::ANSIColor=colorstrip -ple '$_ = colorstrip($_)'
19
20 This has long bothered me, but not enough to be worth investigating
21 myself...
22
23 Zac mentioned in a different subthread that portage's logger is single-
24 threaded ATM, and could become a bottleneck if it had to do too much
25 output processing.
26
27 How feasible might it be to make something like this a (possibly optional
28 but presumably enabled by default) portage dep, and set portage's default
29 logging to use it when writing the log file (as opposed to the screen
30 output)? Presumably that would pipe to another app to do the actual
31 logfile filtering and writing, so the threading issue would disappear.
32
33 Actually, presuming there's already a python implementation to parallel
34 that perl one, it's possible the only thing that would need changed would
35 be portage's default logging command. Pythonistas?
36
37 --
38 Duncan - List replies preferred. No HTML msgs.
39 "Every nonfree program has a lord, a master --
40 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
[gentoo-dev] Re: rfc: escape sequences in logs Ulrich Mueller <ulm@g.o>