On Fri, 2019-12-06 at 08:57 -0800, Ryan Schmitt wrote:
> How does one enable session and wire logging? My code isn't doing
> anything
> to enable it, although DEBUG logging is enabled in the underlying
> logging
> framework (for testing).
> 

It really depends on the logging toolkit you are using. It should be
described here

http://hc.apache.org/httpcomponents-client-5.0.x/logging.html


I am using log4j2. In my case I need set those two logging categories
to WARN priority.
----
<Configuration status="WARN" name="XMLConfigTest">
    <Appenders>
        <Console name="STDOUT">
            <!--<PatternLayout pattern="%msg%n%xThrowable"/>-->
            <PatternLayout pattern="%d %-5level 
[%t][%logger]%notEmpty{[%markerSimpleName]} %msg%n%xThrowable"/>
        </Console>
    </Appenders>
    <Loggers>
        <Root level="warn">
            <AppenderRef ref="STDOUT"/>
        </Root>
        <Logger name="org.apache.hc.core5.reactor" level="debug"/>
        <Logger name="org.apache.hc.client5.http.wire" level="debug"/>
    </Loggers>
</Configuration>
---
Hope this helps

Oleg

> On Fri, Dec 6, 2019 at 3:44 AM Oleg Kalnichevski <[email protected]>
> wrote:
> 
> > On Thu, 2019-12-05 at 18:31 -0800, Ryan Schmitt wrote:
> > > I'm working on an HTTP client integration that will allow Apache
> > > 5's
> > > async
> > > client to be used as the HTTP backend for the AWS Java SDK [1].
> > > One
> > > of the
> > > first smoke tests I ran failed because the server responded to my
> > > request
> > > with a TCP RST. I quickly realized that it was doing this because
> > > I
> > > was
> > > sending an unencrypted request over port 443. To make things
> > > weirder,
> > > this
> > > was taking place *after* a TLS session had been successfully
> > > negotiated.
> > > 
> > > I was having this problem on beta6, and I noticed that the most
> > > recent
> > > commit to the client, 070f30fdc ("Fixed session i/o and wire
> > > logging
> > > in
> > > async clients"), had modified some async wire logging code that I
> > > was
> > > starting to grow suspicious of during my debugging. I upgraded to
> > > beta7-SNAPSHOT, and sure enough, the problem went away. I'd like
> > > to
> > > get a
> > > better idea of what the problem is, and in particular, why my
> > > other
> > > HttpClient 5 integration doesn't seem to have this problem. (Is
> > > there
> > > a
> > > workaround I can use on beta6?)
> > > 
> > 
> > Hi Ryan
> > 
> > It was my bad. I tweaked i/o session initialization logic in core
> > and
> > forgot to adapt logging code in client after upgrade to the latest
> > core
> > BETA.
> > 
> > The defect only manifests itself when running with i/o session and
> > wire
> > logging on, which is not the case by default. That is the reason
> > the
> > regression has gone undetected for so long.
> > 
> > If you do not need to activate i/o session or wire logging the bug
> > should never trigger with beta6.
> > 
> > Oleg
> > 
> > 
> > 
> > -----------------------------------------------------------------
> > ----
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> > 
> > 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to