Gentoo Archives: gentoo-dev

From: William Hubbs <williamh@g.o>
To: gentoo-dev@l.g.o
Cc: mgorny@g.o
Subject: [gentoo-dev] rfc: escape sequences in logs
Date: Mon, 02 Sep 2013 19:22:08
Message-Id: 20130902192152.GB1762@linux1
1 On Mon, Sep 02, 2013 at 01:33:19PM +0200, Michał Górny wrote:
2 > Dnia 2013-09-01, o godz. 16:49:34
3 > William Hubbs <williamh@g.o> napisał(a):
4 >
5 > > On Sat, Aug 31, 2013 at 10:48:32PM +0200, Michał Górny wrote:
6 > > > Dnia 2013-08-31, o godz. 11:26:30
7 > > > Ulrich Mueller <ulm@g.o> napisał(a):
8 > > >
9 > > > > >>>>> On Sat, 31 Aug 2013, Michał Górny wrote:
10 > > > >
11 > > > > > And time for a small update.
12 > > > >
13 > > > > In git-r3_checkout:
14 > > > >
15 > > > > git --no-pager diff --color --stat \
16 > > > > ${old_commit_id}..${new_commit_id}
17 > > > >
18 > > > > I'd rather omit the --color option, otherwise log files will contain
19 > > > > escape sequences.
20 > > >
21 > > > I'd rather leave it. The diff is more for pretty-printing anyway, it
22 > > > shouldn't really matter in the logs.
23 > >
24 > > Please don't. I also do not want escape sequences in log files.
25 >
26 > Ok, '--color' removed. However, I think we should work something out to
27 > get both parties satisfied. Maybe portage feature or a tool to 'uncruft'
28 > logs from escape sequences since many people actually benefit from them.
29
30 All,
31
32 I'm starting a new thread on this, because I think it might warrant some
33 discussion.
34
35 I can see why someone might want to use escape codes for color displays,
36 etc. However, imo, escape codes do not belong in log files.
37
38 mgorny says many people benefit from having escape codes in log
39 files, but I see no benefit from it, and I don't like going through
40 build.log because of them. If you load a build.log into an editor, the
41 escape sequences are basically trash characters that get in the way.
42
43 Another consideration is if someone puts messages from a build.log
44 directly in a bug and the messages contain escape codes, this will crash
45 things like pybugz because bugzilla doesn't filter out the escape
46 character.
47
48 Does anyone else have an opinion on this?
49
50 Thanks,
51
52 William

Attachments

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

Replies