cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: patch to print version info on stderr

From: David Byron <DByron_at_everdreamcorp.com>
Date: Wed, 17 Sep 2003 08:56:34 -0700

On Tue, 16 Sep 2003, Daniel Stenberg wrote:

> On Tue, 16 Sep 2003, David Byron wrote:
>
> > Please consider this patch to print version info on stderr, and to
> > make it possible to redirect this to a file.
>
> I think this is conceptually wrong. When you ask for
> something, the sensible stream to write it to is stdout.
> stderr is used for errors or meta-data that is not really
> what you asked for.

I agree.

> I did a quick check around my system and I found out that the
> --version option of all the very common tools I found
> supporting it, writes the version info to stdout.
>
> All this taken into account, I'm not in favour of this approach.

Makes sense to me. I actually looked into getting the version stuff to come
out on a redirected standard out, but punted because the code to process
--output looked complicated. Now that I've looked closer, I think I
understand it. I'll start working on a patch.

> > I think this patch also paves the way for reporting command line
> > errors on a redirected stderr instead of stderr itself which would
> > also be useful for me.
>
> I agree with you that error messages should use the
> redirected stderr instead of the original one when --stderr is used.

I'll try to make some progress on this as well.

Thanks.

-DB

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-09-17