Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 98688 invoked from network); 9 Sep 2005 15:22:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Sep 2005 15:22:35 -0000 Received: (qmail 83390 invoked by uid 500); 9 Sep 2005 15:22:31 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 83348 invoked by uid 500); 9 Sep 2005 15:22:30 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 83335 invoked by uid 99); 9 Sep 2005 15:22:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Sep 2005 08:22:30 -0700 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [66.163.169.223] (HELO smtp104.mail.sc5.yahoo.com) (66.163.169.223) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 09 Sep 2005 08:22:41 -0700 Received: (qmail 14124 invoked from network); 9 Sep 2005 15:22:27 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:Mime-Version:In-Reply-To:References:Content-Type:Message-Id:Content-Transfer-Encoding:From:Subject:Date:To:X-Mailer; b=cs8JzSOwFSPYLHWdIqryjDLnWxRMQRYvWoIKCS1nbws0+1ByUUARtlFTTlJwvBRj1AqldGvl4RcJ/6vHjY2oBW9JEmdas65zoK1og1SKnCnZVjfABWsr3qRlnw9IfFFWT40nmsGcf+vlKfKmfUykWKyv7gCfbJ7x+VWLPX6uSC4= ; Received: from unknown (HELO ?192.168.1.105?) (david?jencks@66.93.38.137 with plain) by smtp104.mail.sc5.yahoo.com with SMTP; 9 Sep 2005 15:22:27 -0000 Mime-Version: 1.0 (Apple Message framework v622) In-Reply-To: <4321A114.4040403@earthlink.net> References: <4315E59C.9020809@earthlink.net> <4321A114.4040403@earthlink.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable From: David Jencks Subject: Re: Tomcat, logging, admin portlet, and GBeans Date: Fri, 9 Sep 2005 08:22:25 -0700 To: dev@geronimo.apache.org X-Mailer: Apple Mail (2.622) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I don't fully understand what this issue is about, but I would like to=20= point out that the first assumption (that there is one web container=20 per image) is currently wrong and IMO not likely to change for M5 thanks david jencks On Sep 9, 2005, at 7:49 AM, Joe Bohn wrote: > > Aaron Mulder wrote: In order to do this right, I think we=20 > should define an interface >> for web server request log access. That interface should have a=20 >> method >> that searches the logs, like the server log GBean does, so rather=20 >> than the >> console code asking the web server for log files and then opening=20 >> files >> and scanning them, the console should pass a bunch of search=20 >> parameters to >> the web server, and the web server should identify and search its own=20= >> logs >> and just return the results to the console. If the web server has >> multiple logs, I guess it should have a method that gets a list of = log >> file names, so the portlet can let you select the log to query, and=20= >> the >> search method can take the log file name as a parameter. >> >> I have an outstanding task to rearrange the management=20 >> interface >> works for the web containers and connectors, so part of that can be >> exposing the log manager or whatever we call the interface mentioned >> above. So after those changes, the code should look something like=20= >> this: >> >> J2EEServer server =3D ... >> WebManager[] managers =3D ... server.getWebManagers(); >> (select Tomcat or Jetty WebManager to work with) >> RequestLogManager log =3D ... managers[i].getRequestLog(); >> (do log stuff such as: >> String[] logFiles =3D log.getLogFiles(); >> LogLine[] hits =3D log.searchLogs(logFile, start, end, maxRows,=20= >> ...); >> ) >> >> > > - We continue to assume that there will be only 1 container and hence=20= > 1 Web Manager in an image (see my earlier question on this point).=A0 > - As you suggest we add a mechanism to the WebManager to get access=20= > to logs.=A0=A0 > - Create an Interface (WebAccessLogHelper) with methods similar to=20 > the class methods on the current WebAccessLogHelper class.=A0 There = will=20 > be some additions for handling multiple logs and some other changes=20 > (see below). > - Create implementations of the WebAccessLogHelper for each supported=20= > container type. > - Add a method to the WebManager to return a reference to the=20 > appropriate WebAccessLogHelper implementation for the container. > - Have the portlet interact with the WebAccessLogHelper and in=20 > particular make queries via an enhanced WebAcessLogCriteria object=A0=A0= =20 > (enhanced to include the log selection, max# of records to return,=20 > etc...).=A0 > > So the WebAccessLogViewerPortlet pseudo-code would look something like=20= > this: > J2EEServer server =3D .... > WebManager[] managerArray=A0 =3D .... server.getWebManagers(); > WebManager manager =3D WebManagers[0];=A0=A0 // select the first = manager in=20 > the set for now.=A0 If we support multiple managers we can enhance = this=20 > for some user selection. > WebAccessLogHelper logHelper =3D manager.getLogHelper(); > // No need to query the container type .. that's hidden behind the=20 > implementation of the log helper interface. > ArrayList logs =3D logHelper.getLogs()=A0=A0 // to return a list of = logs=20 > for display/selection (initially select the first log in the list) > File[] files =3D logHelper.getFiles()=A0=A0 // to return a list of = files=20 > for display only (for those who would like to see the actual files and=20= > the locations).=A0 > WebAccessLogCriteria =3D new WebAccessLogCriteria( criteria defaults = ..=20 > including the selected log). > ArrayList searchResults =3D WebAccessLogHelp.searchLogs( criteria); > > Criteria would include most of what there is is today with some minor=20= > changes: > - selected Log=A0 (user can select from list if more than one). > - Start date/time > - End data/time > - Host > - authUser > - method > - URI > - message > - max # of messages to return > - Starting record # (for displaying subsequent pages). > > >> To get started, perhaps you could propose an interface for = the >> RequestLogManager or whatever we call it, and look at how we could >> implement that for Tomcat and Jetty. >> >> Thanks, >> Aaron >> >> On Wed, 31 Aug 2005, Joe Bohn wrote: >> >>> I was investigating what is necessary to get the log management=20 >>> portlet >>> in the console working for tomcat. It currently only works to=20 >>> display >>> the jetty web log. >>> >>> As I was digging into this it is starting to get a little deeper=20 >>> than I >>> anticipated and would like some recommendations. >>> >>> - The log portlet references a GBean object for the JettyRequestLog. >>> - I don't see an equivalent GBean in tomcat. Should I attempt to=20 >>> create >>> one and wrap the Tomcat web log in a GBean too? >>> >>> --=20 >>> Joe Bohn >>> joe.bohn@earthlink.net >>> >>> "He is no fool who gives what he cannot keep, to gain what he cannot=20= >>> lose." -- Jim Elliot >>> >>> >>> >> >> > > --=20 > Joe Bohn > joe.bohn@earthlink.net > > "He is no fool who gives what he cannot keep, to gain what he cannot=20= > lose." -- Jim Elliot >