hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony <cmnewslet...@gmail.com>
Subject Re: unable to log using log4j for httpclient4.1.3 in JBoss EAP6.0
Date Wed, 09 Sep 2015 11:23:23 GMT
I think it's more of a combination. I just want to see if anyone has
similar problem and can shed some light.

On Wed, Sep 9, 2015 at 2:05 AM, Stefan Magnus Landrø <
stefan.landro@gmail.com> wrote:

> Isn't this rather a log4j issue?
>
> Sendt fra min iPhone
>
> > Den 9. sep. 2015 kl. 04.23 skrev Tony <cmnewsletter@gmail.com>:
> >
> > Hi,
> >
> > We are using slf4j&log4j for our web application logging, and we put the
> > log4j.xml file out of our  WAR file so that any changes to the log4j.xml
> > will be read by our scheduler(every 10 min) and take effect without
> > restarting the JBoss server.
> >
> > The problem we are having is that even after we put the
> > <logger name="org.apache.http">
> >    <level value="DEBUG"/>
> >  </logger>
> >
> > into our log4j.xml, none of the httpclient log is getting logged at all.
> >
> > It only works when we add the following line into the standalone.xml:
> >
> >           <file-handler name="APP_LOG">
> >                <formatter>
> >                <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c]
> (%t)
> > %s%E%n"/>
> >                </formatter>
> >                <file path="C:/directoryOutsideJBoss/logs/app.log"/>
> >                <append value="true"/>
> >            </file-handler>
> >            <logger category="org.apache.http">
> >                <level name="DEBUG"/>
> >                <handlers>
> >                    <handler name="APP_LOG"/>
> >                </handlers>
> >            </logger>
> > but this solution is not acceptable since we have to restart the JBoss
> > server to have the new logging take effect.
> >
> > I did pass the following parameter when starting JBoss:
> >
> > -Dlog4j.configuration=file:C:\directoryOutsideJBoss\conf\log4j.xml
> >
> >
> > In out WAR/lib directory,  we have:
> > httpclient-4.1.3.jar
> > httpcore-4.1.4.jar
> > log4j-1.2.17.jar
> > slf4j-api-1.7.2.jar
> > slf4j-log4j12-1.7.2.jar
> >
> > Below is our jboss-deployment-structure.xml
> >
> > <jboss-deployment-structure>
> >  <deployment>
> >    <exclusions>
> >      <module name="org.apache.commons.configuration"/>
> >      <module name="org.apache.log4j" />
> >      <module name="org.jboss.logging"/>
> >      <module name="org.slf4j" />
> >      <module name="org.slf4j.impl" />
> >      <module name="org.apache.httpcomponents" />
> >    </exclusions>
> >    <dependencies>
> >      <module name ="org.apache.commons.lang"/>
> >      <module name ="org.apache.commons.beanutils"/>
> >      <module name ="org.apache.commons.codec"/>
> >      <module name ="org.apache.commons.io"/>
> >      <module name ="org.javassist"/>
> >      <module name ="org.picketbox"/>
> >      <module name ="javax.ws.rs.api"/>
> >      <module name="org.dom4j" />
> >      <module name="org.apache.commons.collections"/>
> >      <module name="com.google.guava"/>
> >      <module name="org.apache.cxf" />
> >      <module name="org.jboss.remote-naming" />
> >    </dependencies>
> >  </deployment>
> > </jboss-deployment-structure>
> >
> > BTW, I tried latest HttpClient4.5, same problem.
> >
> > Thanks in advance.
> >
> > Tony
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>

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