Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: williamh@g.o
Subject: Re: [gentoo-dev] rfc: escape sequences in logs
Date: Mon, 02 Sep 2013 19:41:27
Message-Id: 20130902214128.756099b6@gentoo.org
In Reply to: [gentoo-dev] rfc: escape sequences in logs by William Hubbs
1 Dnia 2013-09-02, o godz. 14:21:52
2 William Hubbs <williamh@g.o> napisał(a):
3
4 > On Mon, Sep 02, 2013 at 01:33:19PM +0200, Michał Górny wrote:
5 > > Dnia 2013-09-01, o godz. 16:49:34
6 > > William Hubbs <williamh@g.o> napisał(a):
7 > >
8 > > > On Sat, Aug 31, 2013 at 10:48:32PM +0200, Michał Górny wrote:
9 > > > > Dnia 2013-08-31, o godz. 11:26:30
10 > > > > Ulrich Mueller <ulm@g.o> napisał(a):
11 > > > >
12 > > > > > >>>>> On Sat, 31 Aug 2013, Michał Górny wrote:
13 > > > > >
14 > > > > > > And time for a small update.
15 > > > > >
16 > > > > > In git-r3_checkout:
17 > > > > >
18 > > > > > git --no-pager diff --color --stat \
19 > > > > > ${old_commit_id}..${new_commit_id}
20 > > > > >
21 > > > > > I'd rather omit the --color option, otherwise log files will contain
22 > > > > > escape sequences.
23 > > > >
24 > > > > I'd rather leave it. The diff is more for pretty-printing anyway, it
25 > > > > shouldn't really matter in the logs.
26 > > >
27 > > > Please don't. I also do not want escape sequences in log files.
28 > >
29 > > Ok, '--color' removed. However, I think we should work something out to
30 > > get both parties satisfied. Maybe portage feature or a tool to 'uncruft'
31 > > logs from escape sequences since many people actually benefit from them.
32 >
33 > All,
34 >
35 > I'm starting a new thread on this, because I think it might warrant some
36 > discussion.
37 >
38 > I can see why someone might want to use escape codes for color displays,
39 > etc. However, imo, escape codes do not belong in log files.
40
41 Well, colors are not the only thing that uses escape sequences. They
42 are used pretty often for various kinds of progress reporting --
43 percentages, progress bars. Many tools simply don't implement any other
44 kind of progress reporting, so sometimes it's either escape sequences
45 or long waiting with no signs of life.
46
47 > mgorny says many people benefit from having escape codes in log
48 > files, but I see no benefit from it, and I don't like going through
49 > build.log because of them. If you load a build.log into an editor, the
50 > escape sequences are basically trash characters that get in the way.
51
52 I said people benefit from having them output during the build process.
53 Logs are a different thing, that's why I suggested having a feature
54 that would remove those from output when generating logs.
55
56 > Another consideration is if someone puts messages from a build.log
57 > directly in a bug and the messages contain escape codes, this will crash
58 > things like pybugz because bugzilla doesn't filter out the escape
59 > character.
60
61 That is a bug in pybugz and not an argument, you know.
62
63 --
64 Best regards,
65 Michał Górny

Attachments

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

Replies

Subject Author
Re: [gentoo-dev] rfc: escape sequences in logs William Hubbs <williamh@g.o>