[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch #5524] Error file command line option
From: |
John Darrington |
Subject: |
Re: [patch #5524] Error file command line option |
Date: |
Mon, 6 Nov 2006 18:44:41 +0800 |
User-agent: |
Mutt/1.5.4i |
We're dealing with two questions here:
1. What should the default stream for log messages be?
2. Should we allow the user to overide the default?
To deal with question 1, I personally would prefer the default to be
stdout. Many of the log messages are clearly not errors, and thus
don't belong on stderr. Even those which are 'error messages', eg:
"All characters in field must be digits.", are not the result of
errors in PSPP; they are the correct output that should be
produced, given that particular input. I think that stderr should be
reserved for drastic errors, like those provoking
request_bug_report_and_abort. Having said that, I'm aware that other
GNU software doesn't behave that way, (notably GCC).
Now onto question 2: I can't see a good reason not to allow this
option. Admittedly, my patch isn't the most elegent, especially as it
introduces another global variable.
In sofar as solving the immediate problem is concerned, changing
stdout to stderr, may not be sufficient, because some of the tests
currently redirect them to different places.
J'
On Sun, Nov 05, 2006 at 06:00:30PM +0000, Ben Pfaff wrote:
Follow-up Comment #1, patch #5524 (project pspp):
There's something that bothers me about this. I think it's that we're not
using the standard streams the way we're supposed to: output should go to
stdout, errors to stderr.
What if, instead of applying this patch, we just fixed the problem with the
streams:
--- msg-ui.c.~1.4.~ 2006-11-04 21:24:56.000000000 -0800
+++ msg-ui.c 2006-11-05 10:00:21.000000000 -0800
@@ -142,7 +142,7 @@ handle_msg (const struct msg *m)
ds_put_cstr (&string, m->text);
if (get_error_routing_to_terminal ())
- dump_message (ds_cstr (&string), get_viewwidth (), 8, stdout);
+ dump_message (ds_cstr (&string), get_viewwidth (), 8, stderr);
ds_destroy (&string);
}
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.
pgpaHCcfyfFFW.pgp
Description: PGP signature
- [patch #5524] Error file command line option, John Darrington, 2006/11/05
- [patch #5524] Error file command line option, Ben Pfaff, 2006/11/05
- Re: [patch #5524] Error file command line option,
John Darrington <=
- Re: [patch #5524] Error file command line option, Ben Pfaff, 2006/11/06
- Re: [patch #5524] Error file command line option, John Darrington, 2006/11/07
- Re: [patch #5524] Error file command line option, Ben Pfaff, 2006/11/07
- Re: [patch #5524] Error file command line option, John Darrington, 2006/11/07
- Re: [patch #5524] Error file command line option, Ben Pfaff, 2006/11/08
- lexer, John Darrington, 2006/11/08
- Re: lexer, Ben Pfaff, 2006/11/09
[patch #5524] Error file command line option, John Darrington, 2006/11/07