Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 733 invoked from network); 17 Dec 2008 16:28:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Dec 2008 16:28:57 -0000 Received: (qmail 60572 invoked by uid 500); 17 Dec 2008 16:29:00 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 60501 invoked by uid 500); 17 Dec 2008 16:29:00 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 60475 invoked by uid 99); 17 Dec 2008 16:29:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Dec 2008 08:29:00 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [209.174.123.51] (HELO dubrium.sys.ma.cait.org) (209.174.123.51) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Dec 2008 16:28:37 +0000 Received: from st06410722729.caituser.cait.org ([64.107.227.29] helo=russ-linux.cait.org) by dubrium.sys.ma.cait.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1LCzFs-0000b5-7u for user@geronimo.apache.org; Wed, 17 Dec 2008 10:28:16 -0600 Message-ID: <4949289B.1010606@cait.org> Date: Wed, 17 Dec 2008 10:28:11 -0600 From: Russell E Glaue User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: user@geronimo.apache.org Subject: Re: How to set up logging for a connector References: <4936FDBA.6020303@cait.org> <5eb405c70812032247k2a77573doecfd0961bcd80228@mail.gmail.com> <4937F0D9.1070007@cait.org> In-Reply-To: <4937F0D9.1070007@cait.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score-External: -1.4 (-) X-Virus-Checked: Checked by ClamAV on apache.org The solution for this is discussed in the thread user@geronimo.apache.org "feature? ContainerGroup" 12/05/2008 09:46 AM. The solution requires deploying a new jetty container via a gbean, and also deploying a new NCSARequestLog gbean. I have entered a feature request into the Jetty project's issue system. http://jira.codehaus.org/browse/JETTY-835 This feature request is to implement a new RequestLog that does more than file-based logging. The suggestion has been to use slf4j in the new implementation, which in turn will support sending logs to Socket, Syslog, and will in turn support log4j. -RG Russell E Glaue wrote: > Is it possible to configure a separate logging for different virtual hosts I > configure? > > Say I configure the vhost of "www.example.com" and I want to log all traffic > going to that vhost in a log file "var/log/www.example.com_yyy_mm_dd.log" > > I can deploy a web application to a virtual host I define in the > geronimo-web.xml file. > > Can I also setup logging based on virtual hosts? > > -RG > > > > Jarek Gawor wrote: >> I'm not sure how to do what you want (you might need to write some >> custom code) but you should be able to get rid of that NPE by changing >> the following: >> >> >> >> to: >> >> >> ServerInfo >> >> >> in your RequestLog gbean. >> >> Jarek >> >> On Wed, Dec 3, 2008 at 4:44 PM, Russell E Glaue wrote: >>> Using geronimo-jetty 2.1.3 >>> >>> I create a new HTTPSelectChannelConnector on port 21050 >>> Suppose I deploy 20 to 30 different web applications to this connector. >>> >>> Then I want to log all activity through that connector to a certain log file, >>> and not the default jetty_yyyy_mm_dd.log file, but a new >>> projectXX_yyyy_mm_dd.log file. >>> >>> How do I do this? >>> >>> >>> I have attempted to start configuring Geronimo using the NCSARequestLog gbean, >>> but I am getting an initialization error (pasted below) on Geronimo start up, >>> erroring on doStart(). >>> >>> I cannot find any written documentation on how to change the log file output for >>> a connector. I have read how to change the log file for an individual web >>> application, but I do not want to do that. I want to change the log file on the >>> connector level. >>> >>> >>> >>> ... >>> >> name="org.apache.geronimo.configs/jetty6/2.1.3/car?ServiceModule=org.apache.geronimo.configs/jetty6/2.1.3/car,j2eeType=GBean,name=RequestLog" >>> gbeanInfo="org.apache.geronimo.jetty6.requestlog.NCSARequestLog"> >>> var/log/projectXX_yyyy_mm_dd.log >>> dd/MMM/yyyy:HH:mm:ss ZZZ >>> GMT >>> 30 >>> true >>> true >>> >>> >>> org.apache.geronimo.configs >>> jetty6 >>> 2.1.3 >>> car >>> JettyWebContainer >>> >>> >>> >>> >>> >> name="org.apache.geronimo.configs/jetty6/2.1.3/car?ServiceModule=org.apache.geronimo.configs/jetty6/2.1.3/car,j2eeType=GBean,name=project-XX" >>> gbeanInfo="org.apache.geronimo.jetty6.connector.HTTPSelectChannelConnector"> >>> 21050 >>> 8096 >>> 0.0.0.0 >>> -1 >>> 0 >>> 50 >>> 0 >>> 8192 >>> >>> >>> org.apache.geronimo.configs >>> jetty6 >>> 2.1.3 >>> car >>> JettyWebContainer >>> >>> >>> >>> ... >>> >>> >>> >>> Error message on Geronimo startup with above configuration: >>> -- >>> Module 24/67 org.apache.geronimo.configs/j2ee-corba-yoko/2.1.3/car >>> started in 1.558s >>> Module 25/67 org.apache.geronimo.configs/jetty6/2.1.3/car >>> 15:27:20,161 ERROR [GBeanInstanceState] Error while starting; GBean is now in >>> the FAILED state: >>> abstractName="org.apache.geronimo.configs/jetty6/2.1.3/car?ServiceModule=org.apache.geronimo.configs/jetty6/2.1.3/car,j2eeType=GBean,name=RequestLog" >>> java.lang.NullPointerException >>> at >>> org.apache.geronimo.jetty6.requestlog.NCSARequestLog.doStart(NCSARequestLog.java:113) >>> at >>> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:998) >>> at >>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268) >>> at >>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102) >>> at >>> org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:541) >>> at >>> org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart(GBeanDependency.java:111) >>> at >>> org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget(GBeanDependency.java:146) >>> at >>> org.apache.geronimo.gbean.runtime.GBeanDependency$1.running(GBeanDependency.java:120) >>> at >>> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:176) >>> -- >>> >>> >>> >