qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Trufanow <alexandre.trufanow...@gmail.com>
Subject Re: Proton C++ API update
Date Mon, 18 Apr 2016 14:42:56 GMT
I agree, logging events would be a good solution for this use case.

On Fri, Apr 15, 2016 at 10:13 PM, Andrew Stitcher <astitcher@redhat.com>
wrote:

> On Fri, 2016-04-15 at 19:29 +0200, Alexandre Trufanow wrote:
> > The changes look good overall, removing the event class makes the
> > handler's
> > API much cleaner IMO.
> > I found the on_unhandled callback very useful for testing/debugging,
> > when I
> > didn't know what event to expect for my unit tests. Do you think
> > there
> > could be another way of setting a catchall for events?
>
> We considered this when deciding to remove on_unhandled - the problem
> is that after removing event there was no way to make on_unhandled at
> all useful.
>
> So we'd need some other way to handle this, a possibility would be to
> add logging to the empty default handlers, which logs that the specific
> handler hasn't been called but not overridden. As the C++ library has
> no logging infrastructure at the moment, we'd have to add this first.
>
> Note though that in many applications you will expect to call empty
> handlers a lot, so that logging every unhandled event might be
> overkill.
>
> I agree with Justin that it will be very useful to log the events at
> source in any case.
>
> Andrew
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message