Hi, The Pax-Web ticket to support the NCSA log is [1], it's supported since pax-web 1.1, but SMX 4.5.1 use pax-web 1.0.x.
[1]https://ops4j1.jira.com/browse/PAXWEB-269 ------------- Freeman(Yue) Fang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://fusesource.com | http://www.redhat.com/ Twitter: freemanfang Blog: http://freemanfang.blogspot.com http://blog.sina.com.cn/u/1473905042 weibo: @Freeman小屋 On 2013-8-30, at 上午4:25, Matias Urbieta wrote: > We have been using SMX 4.5.1. > Regards > > > > 2013/8/29 Achim Nierbeck <[email protected]> > >> Hi, >> >> which version of ServiceMix are you using? >> Cause this depends on the version of the embedded Pax-Web, there had been a >> bug in the NCSA Logger which is already resolved. >> >> To my knowledge the FUSE ESB contains the fixed version. >> >> regards, Achim >> >> >> 2013/8/29 Matias Urbieta <[email protected]> >> >>> Hi, we have been trying to make request log work in servicemix using >>> different approaches. >>> In first place, we tried to use ops4j configuration in the >>> etc/org.ops4j.pax.web.cfg file as follow based on [1] but it didn't work. >>> >>> org.ops4j.pax.web.log.ncsa.format=/tmp/yyyy_mm_dd.request.log >>> org.ops4j.pax.web.log.ncsa.retaindays=10 >>> org.ops4j.pax.web.log.ncsa.append=true >>> org.ops4j.pax.web.log.ncsa.extended=true >>> org.ops4j.pax.web.log.ncsa.timezone=GMT >>> >>> Next we tried to set up a custom jetty.xml file where we added a request >>> log handler. In this approach, we configured etc/org.ops4j.pax.web.cfg >> file >>> as follow: >>> >>> org.ops4j.pax.web.config.file=etc/jetty.xml >>> >>> and we modified the jetty.xml file as depicted next: >>> >>> <?xml version="1.0"?> >>> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting// >>> DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> >>> >>> <Configure class="org.eclipse.jetty.server.Server"> >>> >>> <Call name="addConnector"> >>> <Arg> >>> <New >>> class="org.eclipse.jetty.server.nio.SelectChannelConnector"> >>> <Set name="host"> >>> <Property name="jetty.host"/> >>> </Set> >>> <!-- default port will be overwritten by pax-web >>> configuration --> >>> <Set name="port"> >>> <Property name="jetty.port" default="8182"/> >>> </Set> >>> <Set name="maxIdleTime">300000</Set> >>> <Set name="Acceptors">2</Set> >>> <Set name="statsOn">false</Set> >>> <Set name="confidentialPort">8443</Set> >>> <Set name="lowResourcesConnections">20000</Set> >>> <Set name="lowResourcesMaxIdleTime">5000</Set> >>> </New> >>> </Arg> >>> </Call> >>> >>> <Call name="getHandler"> >>> <Set name="handlers"> >>> <Array type="org.eclipse.jetty.server.Handler"> >>> <Item> >>> <New >>> class="org.eclipse.jetty.server.handler.StatisticsHandler"> >>> <Set name="handler"> >>> <New >>> class="org.eclipse.jetty.server.handler.HandlerCollection"> >>> <Set name="handlers"> >>> <Array >>> type="org.eclipse.jetty.server.Handler"> >>> <Item> >>> <New >>> class="org.eclipse.jetty.server.handler.ContextHandlerCollection" /> >>> </Item> >>> <Item> >>> <New >>> class="org.eclipse.jetty.server.handler.DefaultHandler" /> >>> </Item> >>> <Item> >>> <New class="org.eclipse.jetty.server.handler.RequestLogHandler"> >>> <Set name="requestLog"> >>> <New >>> id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog"> >>> <Arg>/tmp/yyyy_mm_dd.request.log</Arg> >>> <Set name="retainDays">90</Set> >>> <Set name="append">true</Set> >>> <Set name="extended">false</Set> >>> <Set name="LogTimeZone">GMT</Set> >>> </New> >>> </Set> >>> </New> >>> >>> </Item> >>> </Array> >>> </Set> >>> </New> >>> </Set> >>> </New> >>> </Item> >>> </Array> >>> </Set> >>> </Call> >>> >>> </Configure> >>> >>> Couriously, this last approach works on Jboss Fuse version as expected. >>> >>> What is wrong in both approaches? what is the best way to add a http >>> request listener that produces logs in NCSA format? >>> >>> >>> >>> [1] https://ops4j1.jira.com/wiki/display/paxweb/Basic+Configuration >>> >>> -- >>> Mario Matias Urbieta >>> [email protected] >>> www.fluxit.com.ar Calle 9 #865 >>> La Plata / Buenos Aires / Argentina >>> Tel: +54 221 4275781 Int:308 >>> Cel: +54 011 36814113 >>> -- >>> Mario Matias Urbieta >>> [email protected] >>> www.fluxit.com.ar Calle 9 #865 >>> La Plata / Buenos Aires / Argentina >>> Tel: +54 221 4275781 Int:308 >>> Cel: +54 011 36814113 >>> >> >> >> >> -- >> >> Apache Karaf <http://karaf.apache.org/> Committer & PMC >> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & >> Project Lead >> OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> >> Commiter & Project Lead >> blog <http://notizblog.nierbeck.de/> >> > > > > -- > Mario Matias Urbieta > [email protected] > www.fluxit.com.ar Calle 9 #865 > La Plata / Buenos Aires / Argentina > Tel: +54 221 4275781 Int:308 > Cel: +54 011 36814113
