Gentoo Archives: gentoo-dev

From: Tom Wijsman <TomWij@g.o>
To: gentoo-dev@l.g.o
Cc: williamh@g.o
Subject: Can we have process names and stdout / stderr indication to more efficiently parse build logs? (was: Re: [gentoo-dev] rfc: escape sequences in logs)
Date: Tue, 03 Sep 2013 00:23:02
Message-Id: 20130903022232.0d78832b@TOMWIJ-GENTOO
In Reply to: [gentoo-dev] rfc: escape sequences in logs by William Hubbs
1 On Mon, 2 Sep 2013 14:21:52 -0500
2 William Hubbs <williamh@g.o> wrote:
3
4 > I can see why someone might want to use escape codes for color
5 > displays, etc. However, imo, escape codes do not belong in log files.
6
7 They belong there so future display can remain colorful.
8
9 Why do they not belong there? What do people have to do who want them?
10
11 > mgorny says many people benefit from having escape codes in log
12 > files, but I see no benefit from it, and I don't like going through
13 > build.log because of them. If you load a build.log into an editor, the
14 > escape sequences are basically trash characters that get in the way.
15
16 They make some sections differ and therefore stand out; so, you get a
17 much faster impression of what you are looking at is what you want.
18
19 Why do you open them in an editor and not in a viewer?
20
21 > Does anyone else have an opinion on this?
22
23 There are definitely enough people that want them; so, why not have
24 them by default and strip them if you don't want them? The opposite,
25 adding escape codes where there are none; is a much harder thing to do.
26
27 Actually, I would love to see even more codes in build.log such that
28 they come more machine parseable; for instance, there is no indication
29 which process outputs a certain message, or whether the message
30 happened on stdout or stderr.
31
32 Such information is quite crucial, yet it is missing; it would be neat
33 if I could just grep the last stderr lines of the last process that's
34 not emerge or make, giving me exactly the gcc error I need to see. Once
35 I found that line, grepping context is easy.
36
37 Until then, I'm stuck with having to scroll up to that point; and while
38 I know -j1 helps with that, it would be crude to ignore non -j1 logs...
39
40 If you're trying to more efficiently parse logs; consider adding more
41 information instead, because dropping information does not really gain.
42
43 --
44 With kind regards,
45
46 Tom Wijsman (TomWij)
47 Gentoo Developer
48
49 E-mail address : TomWij@g.o
50 GPG Public Key : 6D34E57D
51 GPG Fingerprint : C165 AF18 AB4C 400B C3D2 ABF0 95B2 1FCD 6D34 E57D

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies