Bugzilla – Bug 474
waf output to stderr
Last modified: 2009-01-31 16:23:01 UTC
Shouldn't all output from waf be to stderr? That would enable better use of ./waf --run scratch/program > save.log Currently part of the output is on stdout and part on stderr. Standard make's output is only on stderr.
Hi. I am neutral on this. But if you really care about it you have to convince upstream WAF maintainer: http://code.google.com/p/waf/issues/list Anyway, it's trivial to redirect everything, just: ./waf --run scratch/program >& save.log Or, if you do not want to use bash extensions: ./waf --run scratch/program > save.log 2>&1
Yes, sure you can redirect stderr. However my issue is a different one: the scratch program outputs debug traces, gnuplot data or whatever on stdout. But waf also outputs to stdout, so the output gets mixed. And gnuplot does not like [ 1/251] cxx: scratch/three-nodes-capture-border.cc -> build/debug/scratch/three-nodes-capture-border_8.o [251/251] cxx_link: build/debug/scratch/three-nodes-capture-border_8.o -> build/debug/scratch/three-nodes-capture-border in it's data files. Yes, I could just write a file directly, but it's easier to use std::cout.
Keep in mind you still have ./waf --shell, then you can run your programs manually without waf interference.
That's how I do it currently. But ./waf --run also recompiles if necessary.
http://code.google.com/p/waf/issues/detail?id=319
Created attachment 360 [details] patch I think this patch takes care of it.
(In reply to comment #6) > Created an attachment (id=360) [details] > patch > > I think this patch takes care of it. > this works for me, +1
This was fixed in upstream WAF. I'll merge in about a week, when WAF 1.5.3 gets released.
Works ok, only kills color if stdout is redirected. Probably some terminal detection code. The upstream changes also fix that issue.
changeset: 4132:6f24531bb23e