Support writing to a build log file.
This issue was originally created at: 2003-05-11 18:56:33.
This issue was reported by: charlesw.
charlesw said at 2003-05-11 18:56:33
Because the total output in a build procedure is a mixture of scons, gcc, ld and all of the other tools used in this procedure. The users will be very glad to see colorized output so the error, warning, notification can be distinguished by color. It is also very helpful to let the user know the progress of a long run build procedure.
For scons, I hope to add the following options:
--color=[WHEN]: generate colorized the scons output. What color to render what category is determined by scons configure file. WHEN might be 'always', 'never', 'always'.-l --log file: dump all output (both stdout/stderr are included) into the specified file. This dump shouldn't be colorize even if the output to tty is colorized.I emphasize these two options because I always use the following commands to do my make:
make 2>&1 | tee make.out
If the output is colorized, the make.out will contain the escape consequence to render the text. The output always be some sort mess. I have tried: 'vi make.out', 'emacs make.out', 'less make.out', 'less -r make.out'. So I hope the log file should not contain any escape consequnce even if the output to tty is colorized.
issues@scons said at 2003-05-11 18:56:33
Converted from SourceForge tracker item 736267
gregnoel said at 2008-04-14 00:15:09
Should be split into two issues: this bug for logging output and a new bug to colorize output. Steven to research and prioritize.
gregnoel said at 2008-04-18 18:47:33
We shouldn't have UNCONFIRMED issues; changing them to NEW.
gregnoel said at 2008-11-06 16:48:00
*** Issue 2241 has been marked as a duplicate of this issue. ***
stevenknight said at 2009-02-24 22:52:29
Issue #1516 already exists for coloring gcc output. It contains a prototype patch, which is kind of at the wrong layer (it changes the SPAWN variable) but contains some code that could be a suitable starting point. We'll let that be the controlling issue for the colorization part of this.
Changing the subject of this issue to just reflect the "write to a log file" functionality.
Reprioritizing to 2.x P3 so it can be scheduled when we break down the large pool of 2.x issues.
stevenknight said at 2009-11-10 18:00:20
stevenknight => issues@scons
ydirson said at 2010-03-26 08:51:45
Additionally, logfile support could be added per-action. That would be another way to help untangle output of parallel jobs.
thosrtanner said at 2012-06-25 00:11:24
Please don't put colourisation in scons. It's trivial enough to do a wrapper which can add colour according to the tools you use.
You only mention gcc. I have a build system which supports 3 different toolchains, and thats just for C/C++/fortran.
Then there's lint, the different linkers, various home grown scripts that are called during the build process that produce errors, automated unit tests...
Not to mention some people having strange default colours for their terminal windows.
Yes, get the process sorted out so that the outputs don't get intermingled. But please don't add colourisation and logging.That's just going to add a whole load of effort to the development queue for not much payback.
As for log files,, just one log file isn't enough, and you also need the ability to append to an existing file rather then overwrite it.
Spoken from bitter experience.
gregnoel said this issue is duplicated by #2241 at 2008-11-06 16:48:01.