From: Philipp K. J. <ja...@ie...> - 2009-10-27 03:34:00
|
Sorry for stepping into this discussion late. 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. So, if we could support something like this, that would be great: set warnings # directs to STDERR or terminal set warnings "file" # directs to file unset warnings # suppresses output Interactive terminals can then be "smart" to default to direct warnings to STDERR. But people who use gnuplot in the background have the flexibility to do what they need. 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? Best, Ph. On Monday 26 October 2009 11:53:47 am Ethan Merritt wrote: > On Monday 26 October 2009 07:15:24 Petr Mikulik wrote: > > > > > Every message that is generated by > > > > > fprintf(stderr,ERROR_NOTICE(foo)) > > > > > should be changed to use int_warn() instead. > > > > > > > > Good idea. These ERROR_NOTICEs are actually warnings only, not > > > > errors. I've tried to patch this replacement in color.c and > > > > graphics.c, it works fine. > > > > > > I am inclined to agree that warning "this terminal does not support..." > > > is not very useful. Maybe we should jusr remove these altogether. > > I have removed them, and changed the remaining ERROR_NOTICE instances > to call int_warn() instead. I did the same for the small number of > warnings sent directly to stderr by term.c and axis.c. > > I leave it to you if you want to experiment with making int_warn() > output condition on if (interactive) or some other controlling flag. |