cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: patch to print version info on stderr

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 17 Sep 2003 07:53:20 +0200 (CEST)

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.

All operating systems I know of - including Windows - can redirect stdout
easily to a file

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.

> 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.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-09-17