You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Jim Meyering <ji...@meyering.net> on 2006/12/05 20:15:57 UTC

nit in qpidd: diagnostic to stderr, not to stdout

This change makes qpidd write a diagnostic to stderr, not stdout.
This demonstrates the problem:

  $ src/qpidd -9   2>/dev/null
  Warning: skipping unrecognised option -9
  WARNING: Persistence not enabled, no recovery of queues or messages.
  Listening on port 5672...

IMHO, qpidd should fail in that case, too.

2006-12-05  Jim Meyering  <me...@redhat.com>

	* lib/broker/Configuration.cpp (Configuration): Print diagnostic
	to stderr, not stdout.

Index: lib/broker/Configuration.cpp
===================================================================
--- lib/broker/Configuration.cpp	(revision 482736)
+++ lib/broker/Configuration.cpp	(working copy)
@@ -52,7 +52,7 @@
             matched = (*i)->parse(position, argv, argc);
         }
         if(!matched){
-            std::cout<< "Warning: skipping unrecognised option " << argv[position] << std::endl;
+            std::cerr<< "Warning: skipping unrecognised option " << argv[position] << std::endl;
             position++;
         }
     }

Re: nit in qpidd: diagnostic to stderr, not to stdout

Posted by Alan Conway <ac...@redhat.com>.
Applied

On Tue, 2006-12-05 at 20:15 +0100, Jim Meyering wrote:
> This change makes qpidd write a diagnostic to stderr, not stdout.
> This demonstrates the problem:
> 
>   $ src/qpidd -9   2>/dev/null
>   Warning: skipping unrecognised option -9
>   WARNING: Persistence not enabled, no recovery of queues or messages.
>   Listening on port 5672...
> 
> IMHO, qpidd should fail in that case, too.
> 
> 2006-12-05  Jim Meyering  <me...@redhat.com>
> 
> 	* lib/broker/Configuration.cpp (Configuration): Print diagnostic
> 	to stderr, not stdout.
> 
> Index: lib/broker/Configuration.cpp
> ===================================================================
> --- lib/broker/Configuration.cpp	(revision 482736)
> +++ lib/broker/Configuration.cpp	(working copy)
> @@ -52,7 +52,7 @@
>              matched = (*i)->parse(position, argv, argc);
>          }
>          if(!matched){
> -            std::cout<< "Warning: skipping unrecognised option " << argv[position] << std::endl;
> +            std::cerr<< "Warning: skipping unrecognised option " << argv[position] << std::endl;
>              position++;
>          }
>      }