I can't help but observe that this is a workaround for the lack of logging in core; the client is basically dependency-injecting Slf4j into core. The `LoggingIOSessionDecorator` on the previous line would appear to be doing the same thing.
On Wed, Jan 1, 2020 at 2:45 PM Oleg Kalnichevski <[email protected]> wrote: > On Wed, 2020-01-01 at 12:03 -0800, Ryan Schmitt wrote: > > I suppose this is as good a time as any to ask: why do single-core > > IOReactors support the Exception callback (for error logging), but > > not > > multi-core IOReactors? > > MultiCoreIOReactor is nothing more than a collection of > SingleCoreIOReactor instances. They all share the same exception > callback > > > https://github.com/apache/httpcomponents-core/blob/master/httpcore5/src/main/java/org/apache/hc/core5/reactor/DefaultListeningIOReactor.java#L89 > > > > Also, how should this callback be configured when > > creating a client? (I wasn't able to immediately find the relevant > > config > > method to call.) > > > > At the moment HttpAsyncClientBuilder always uses the same > LoggingExceptionCallback instance that simply logs exceptions with > ERROR priority > > > https://github.com/apache/httpcomponents-client/blob/master/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java#L929 > > https://github.com/apache/httpcomponents-client/blob/master/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/LoggingExceptionCallback.java > > If you like this can be made more customisable. > > Does that clarify things a bit? > > Oleg > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
