You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by William Henry <wh...@redhat.com> on 2009/01/01 20:07:33 UTC

Re: C++ broker - some newbie questions

----- "Robert Greig" <ro...@gmail.com> wrote:

> 2008/12/23 William Henry <wh...@redhat.com>:
> 
> >> 1) the broker's default output logging level is nothing. If you
> start
> >> it up, it gives no indication that it is doing anything at all. Is
> >> this deliberate? I think it should really be INFO level, or at
> least
> >> some level that enables the user to see that it is listening on a
> >> port
> >> without running netstat.
> >
> > Yes it is deliberate. Default is silent.
> 
> What is the rationale for this? It seems a very bad idea to me -
> which
> other standard processes behave like this (httpd does not, for
> example).
> 

Good question. One of the desirable properties of message brokers and
other messaging technology is high performance. Eliminating any 
unnecessary writes, even to standard output, is important.  You'll find
that many messaging technologies will have as little or no logging output
going to files or standard out by default.  It can always be turned on if 
needed and there is usually another more efficient mechanism in place.  

Happy New Year.

-William

> RG

Re: C++ broker - some newbie questions

Posted by Alan Conway <ac...@redhat.com>.
William Henry wrote:
> Perhaps the thing to do here is to have a simple message on start-up that says:
> 
> "Broker starting ..."
> "Broker started successfully."
> 
> And then no other output unless specified.
> 

The messages need to be assigned a level as they may be sent to syslog or 
windows event log. I don't see the need for a special case for startup, we just 
need to make sure we're using the levels properly. If info is too verbose we can 
make the  the default notice+ and make sure the the "listening on ..." message 
is at notice level.

> William
> 
> ----- "Alan Conway" <ac...@redhat.com> wrote:
> 
>> Robert Greig wrote:
>>> 2009/1/1 William Henry <wh...@redhat.com>:
>>>
>>>>> What is the rationale for this? It seems a very bad idea to me -
>>>>> which
>>>>> other standard processes behave like this (httpd does not, for
>>>>> example).
>>>>>
>>>> Good question. One of the desirable properties of message brokers
>> and
>>>> other messaging technology is high performance. Eliminating any
>>>> unnecessary writes, even to standard output, is important.  You'll
>> find
>>>> that many messaging technologies will have as little or no logging
>> output
>>>> going to files or standard out by default.  It can always be turned
>> on if
>>>> needed and there is usually another more efficient mechanism in
>> place.
>>> It is certainly important not to write to stdout during the
>> "critical"
>>> flows, i.e message ingress and egress. However that is clearly not
>>> what I am talking about. I am referring to the fact that on startup
>> by
>>> default the broker does not emit any information to indicate that
>> it
>>> has started successfully or which ports it is listening on. I find
>>> that quite bizarre and unhelpful.
>>>
>>> RG
>>
>> Try running the broker with --log-enable=info+ - if you think that
>> gives 
>> reasonable output we can easily change the default. I don't think
>> there is any 
>> per-message info level logging, and if there is it should probably be
>> removed.
>>
>> Cheers,
>> Alan.


Re: C++ broker - some newbie questions

Posted by Alan Conway <ac...@redhat.com>.
William Henry wrote:
> Perhaps the thing to do here is to have a simple message on start-up that says:
> 
> "Broker starting ..."
> "Broker started successfully."
> 
> And then no other output unless specified.
> 
> William

r731649 - I just changed the default to notice+, made the "listening on" 
messages notice level, and added a notice level "broker running" once all 
listeners have started. The default output from starting and stopping a broker 
now looks like this:

2009-jan-05 14:16:15 notice Listening on TCP port 5672
2009-jan-05 14:16:15 notice Broker running
2009-jan-05 14:16:17 notice Shut down

Currently the only notice messages are related to start-up and shut-down events 
for a standalone broker and join/leave events in a cluster. So there is no 
performance impact. notice+ means notice and higher, so warning error and 
critical messages will also be logged.


Cheers,
Alan.

Re: C++ broker - some newbie questions

Posted by William Henry <wh...@redhat.com>.
Perhaps the thing to do here is to have a simple message on start-up that says:

"Broker starting ..."
"Broker started successfully."

And then no other output unless specified.

William

----- "Alan Conway" <ac...@redhat.com> wrote:

> Robert Greig wrote:
> > 2009/1/1 William Henry <wh...@redhat.com>:
> > 
> >>> What is the rationale for this? It seems a very bad idea to me -
> >>> which
> >>> other standard processes behave like this (httpd does not, for
> >>> example).
> >>>
> >> Good question. One of the desirable properties of message brokers
> and
> >> other messaging technology is high performance. Eliminating any
> >> unnecessary writes, even to standard output, is important.  You'll
> find
> >> that many messaging technologies will have as little or no logging
> output
> >> going to files or standard out by default.  It can always be turned
> on if
> >> needed and there is usually another more efficient mechanism in
> place.
> > 
> > It is certainly important not to write to stdout during the
> "critical"
> > flows, i.e message ingress and egress. However that is clearly not
> > what I am talking about. I am referring to the fact that on startup
> by
> > default the broker does not emit any information to indicate that
> it
> > has started successfully or which ports it is listening on. I find
> > that quite bizarre and unhelpful.
> > 
> > RG
> 
> 
> Try running the broker with --log-enable=info+ - if you think that
> gives 
> reasonable output we can easily change the default. I don't think
> there is any 
> per-message info level logging, and if there is it should probably be
> removed.
> 
> Cheers,
> Alan.

Re: C++ broker - some newbie questions

Posted by Alan Conway <ac...@redhat.com>.
Robert Greig wrote:
> 2009/1/1 William Henry <wh...@redhat.com>:
> 
>>> What is the rationale for this? It seems a very bad idea to me -
>>> which
>>> other standard processes behave like this (httpd does not, for
>>> example).
>>>
>> Good question. One of the desirable properties of message brokers and
>> other messaging technology is high performance. Eliminating any
>> unnecessary writes, even to standard output, is important.  You'll find
>> that many messaging technologies will have as little or no logging output
>> going to files or standard out by default.  It can always be turned on if
>> needed and there is usually another more efficient mechanism in place.
> 
> It is certainly important not to write to stdout during the "critical"
> flows, i.e message ingress and egress. However that is clearly not
> what I am talking about. I am referring to the fact that on startup by
> default the broker does not emit any information to indicate that it
> has started successfully or which ports it is listening on. I find
> that quite bizarre and unhelpful.
> 
> RG


Try running the broker with --log-enable=info+ - if you think that gives 
reasonable output we can easily change the default. I don't think there is any 
per-message info level logging, and if there is it should probably be removed.

Cheers,
Alan.


Re: C++ broker - some newbie questions

Posted by Robert Greig <ro...@gmail.com>.
2009/1/1 William Henry <wh...@redhat.com>:

>> What is the rationale for this? It seems a very bad idea to me -
>> which
>> other standard processes behave like this (httpd does not, for
>> example).
>>
>
> Good question. One of the desirable properties of message brokers and
> other messaging technology is high performance. Eliminating any
> unnecessary writes, even to standard output, is important.  You'll find
> that many messaging technologies will have as little or no logging output
> going to files or standard out by default.  It can always be turned on if
> needed and there is usually another more efficient mechanism in place.

It is certainly important not to write to stdout during the "critical"
flows, i.e message ingress and egress. However that is clearly not
what I am talking about. I am referring to the fact that on startup by
default the broker does not emit any information to indicate that it
has started successfully or which ports it is listening on. I find
that quite bizarre and unhelpful.

RG