Gentoo Archives: gentoo-dev

From: Tom Wijsman <TomWij@g.o>
To: gentoo-dev@l.g.o
Cc: mgorny@g.o
Subject: Re: 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: Wed, 04 Sep 2013 09:24:34
Message-Id: 20130904112422.7a255d78@TOMWIJ-GENTOO
In Reply to: Re: Can we have process names and stdout / stderr indication to more efficiently parse build logs? (was: Re: [gentoo-dev] rfc: escape sequences in logs) by "Michał Górny"
1 On Wed, 4 Sep 2013 09:17:11 +0200
2 Michał Górny <mgorny@g.o> wrote:
3
4 > Dnia 2013-09-03, o godz. 18:57:12
5 > "Walter Dnes" <waltdnes@××××××××.org> napisał(a):
6 >
7 > > On Tue, Sep 03, 2013 at 10:15:39PM +0200, Tom Wijsman wrote
8 > >
9 > > > That is not what this is about, this is about having escape
10 > > > sequences in build logs obtained from Bugzilla; because, they aid
11 > > > in skimming through logs (until we implement the feature I asked
12 > > > for in subject).
13 > >
14 > > "The road to binary syslog files is paved with good intentions",
15 > > or something like that. Question... why does it have to be escape
16 > > sequences? Can't it be readable plain text? E.g. something like...
17 > >
18 > > //STDERR.OUT.START
19 > > foo
20 > > bar
21 > > blah blah blah
22 > > //STDERR.OUT.END
23 > >
24 > > This would be easy to grep and/or parse in bash.
25 >
26 > Especially if one is interspersed with the other. I suggest trying
27 > first, then suggesting it to others.
28
29 Definitely do not want them on their own line; instead something like
30
31 OUT:make:1000: ...
32 ERR:gcc:1001: ...
33 ERR:gcc:1001: ...
34 ERR:gcc:1001: ...
35 ERR:gcc:1001: ...
36 ERR:make:1000: *** [...] Error 1
37 ERR:make:1000: make[2]: *** Waiting for unfinished jobs....
38
39 If you then grep the last non-make and non-portage STDERR, you simply
40 get just the gcc lines you actually want. From there you can grep the
41 lines around it for context.
42
43 You could then have a tool that tells you something like
44
45 ...
46 === ERROR at build.log:123 ===
47 ...
48 ...
49 ...
50 ...
51 === /ERROR at build.log:123 ===
52 *** [...] Error 1
53 make[2]: *** Waiting for unfinished jobs....
54
55 and that allows you to immediately see the error right away;
56 additionally, it shows a few lines of context before and after. If you
57 need more context, the line number allows you to jump right to it in
58 the build.log if you need even more context.
59
60 We could even build this feature into Bugzilla...
61
62 --
63 With kind regards,
64
65 Tom Wijsman (TomWij)
66 Gentoo Developer
67
68 E-mail address : TomWij@g.o
69 GPG Public Key : 6D34E57D
70 GPG Fingerprint : C165 AF18 AB4C 400B C3D2 ABF0 95B2 1FCD 6D34 E57D

Attachments

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

Replies