From: Philipp K. J. <ja...@ie...> - 2009-10-29 03:25:29
|
You have a point, that works. I even convinced myself that I can do redirection of this form when I call gnuplot as a subprocess from Perl: open GP, "| /usr/bin/gnuplot >& foo.log " or die "Fail: $!"; $cmd = "set t png; set o 'foo.png'; plot 'foo' u 1:2 w lp\n"; print GP $cmd; close GP; Personally, I find it hacky, and would prefer a way for gnuplot to take care of its logging destination itself, without having to rely on shell redirection. But I admit that the shell redirection works. Best, Ph. On Tuesday 27 October 2009 01:37:33 pm you wrote: > Philipp K. Janert wrote: > > I think it would be highly desirable to be able to > > switch warnings on or off (or possibly even set > > where they are sent). > > > > I often call gnuplot from scripts, producing many > > graphs. In such situations, I would like to suppress > > warnings - or maybe put them into a log file. > > IMHO, that's putting the cart before the horse. > > > So, if we could support something like this, that > > would be great: > > > > set warnings # directs to STDERR or terminal > > For all practical purposes, the terminal _is_ STDERR. > > > set warnings "file" # directs to file > > What's wrong with plain and simple redirection from the outside? > > gnuplot 2>file > > > unset warnings # suppresses output > > gnuplot 2>/dev/null > > > Interactive terminals can then be "smart" to default > > to direct warnings to STDERR. > > Except it isn't the terminal > > > But people who use gnuplot in the background have the flexibility to > > do what they need. > > They have that flexibility already, without us having to anything! > > > In a similar spirit: would it be possible to include the > > start-up greeting message in the list of messages > > that can be redirected in this way? > > It already is. |