Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 77893 invoked from network); 22 Apr 2009 15:31:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Apr 2009 15:31:00 -0000 Received: (qmail 88636 invoked by uid 500); 22 Apr 2009 15:30:59 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 88576 invoked by uid 500); 22 Apr 2009 15:30:59 -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 88568 invoked by uid 99); 22 Apr 2009 15:30:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Apr 2009 15:30:59 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.136.44.61] (HELO smtp106.prem.mail.sp1.yahoo.com) (98.136.44.61) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 22 Apr 2009 15:30:49 +0000 Received: (qmail 67513 invoked from network); 22 Apr 2009 15:30:26 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Message-Id:From:To:In-Reply-To:Content-Type:Mime-Version:Subject:Date:References:X-Mailer; b=JHjthXO56Li+DpdIv2fQnVToe6zSVofkHhGtowVJkl3VL+JmqaAre2u2YKnhNdMaCzRHzkuVP9vjGPnfFIixIAFEtN1sTp6N57RsI9EOViTx216A1+rM9A+60kxBoo5TbDY88UlHDIBbAOIHvY18VcrD+5TAQ9UDeMSUave/yTY= ; Received: from unknown (HELO ?10.11.55.39?) (david_jencks@76.76.148.215 with plain) by smtp106.prem.mail.sp1.yahoo.com with SMTP; 22 Apr 2009 15:30:24 -0000 X-YMail-OSG: ef02GI8VM1mk6u.bplcrID3KkriUXPw8yPglG1GOJ7br77PSrnz6XCAIe95lFbmuNsmssDGZny4fQnFo7lGmM74dy9eXL7xLDjdXouYZXyO1fPsD5pdQ0cxk8r_6JSDbKqUcolEP47naJlfJFsG03F8RR5sdXpu.1VXRPtVcg9OkVrOWEEC8xEC.JFRxN.RFErwf93G1utmMDzizk0PBVKD3Fm52AwmWgAoOH.vnNzPS3bi49n0I3QNQr2rnd53_E4EdrDZt6iZUWc2h2hxGieyXluHs3GOPwnDefsflh9ln.3a47DjPjasi8w17qcai0JsGGVbrtZZTVaZHR9gpsbZQVY8jIlOUjqc3cTOv3weCk0t9ho0KaDnlUsarimxjUrCVlVbj7Gg0EIvNWafkZFLWUdT.MEYqqJfXbnBA6BF9s3VR9DmcQol6arBi7_A- X-Yahoo-Newman-Property: ymail-3 Message-Id: <48EDFBD8-C7C2-422D-9A3D-9C29DF8FEC61@yahoo.com> From: David Jencks To: user@geronimo.apache.org In-Reply-To: Content-Type: multipart/alternative; boundary=Apple-Mail-8-114018789 Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: Concepts behind log file per WAR using log4j Date: Wed, 22 Apr 2009 08:30:23 -0700 References: <4D09C947-2A2B-46CE-887E-246683DEF24E@yahoo.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-8-114018789 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable On Apr 22, 2009, at 1:19 AM, Villemos, Gert wrote: > I=92m trying to understand how to setup logging using log4j with =20 > Geronimo. Found the article = http://cwiki.apache.org/GMOxDOC21/configuring-application-specific-logging= -with-log4j.html=20 > but I miss an explanation of the concepts behind the logging. =20 > Likely the problem I have with implementing the logging following =20 > the article are due to this missing understanding. Before bothering =20= > anyone with my faulty source code I would therefore like to know =20 > whether I have understood the concepts correctly; > > 1. Each deployed WAR can maintain separate log file(s), by including =20= > a =91log4j.properties=92 file in the WAR and a definition of where to =20= > unpack it in the =91geronimo-web.xml=92 deployment file. > > You also need a geronimo plan for the war with an =20 > ApplicationLog4jConfigurationGBean gbean to tell log4j about the =20 > special configuration for the war's logging. > > [Gert] I thought the =91geronimo-web.xml=92 was the Geronimo plan for =20= > the war, i.e. I have inserted the ApplicationLog4jConfigurationGBean =20= > bean in this file=85 do I need another file as well? that is the geronimo plan, and you don't need any other file. > > > > 2. The =91{GERONIMO_HOME}/var/log/server-log4j.properties=92 file =20 > defines the log4j setup for the Geronimo server. When deploying WARs =20= > with their own log4j.properties files I do NOT have to change this =20 > file to make them work, the GBean =91DirectoryLog4jConfiguration=92 = will =20 > manage this for me. > > yes. If you don't do anything your app's logging will also end up =20 > in this server log file. You only need to follow the doc =20 > instructions if you want your app's logging to go to a separate file =20= > from the normal server logging. > > [Gert] So if I don=92t do anything I should see my log messages in the = =20 > default log (=85 I dont). And if I follow the instructions on = http://cwiki.apache.org/GMOxDOC21/configuring-application-specific-logging= -with-log4j.html=20 > I should see them somewhere else. that's all correct. It's been a while since I worked on this. IIRC some apps include a =20 log4j configuration file and some have code to install it in log4j. =20 Apps that do this generally end up turning off geronimo's logging. I =20= don't remember the details but if your app has a log4j.properties file =20= in it you might try removing it. Otherwise you may end up tracing =20 through log4j code to figure out why it thinks you don't want stuff =20 logged. > > > > 3. The log files can be viewed from the administration console =20 > through the =91server log=92 portlet, and the =91Filter Criteria=92 = drop =20 > down box will contain each registered log file. > > I don't know if you can look at other log files using the console =20 > log viewer. > > [Gert] Ok=85 I=92ll try and see=85 just wondered why there is a drop = down =20 > box on the log viewer. Seems to indicate that you can have multiple =20= > logs. good point :-) thanks david jencks > > > hope this helps > david jencks > > > > > Thanks, > Gert. > > > Please help Logica to respect the environment by not printing this =20 > email / Pour contribuer comme Logica au respect de l'environnement, =20= > merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht =20= > nicht aus und helfen Sie so Logica dabei die Umwelt zu schuetzen / =20 > Por favor ajude a Logica a respeitar o ambiente n=E3o imprimindo este =20= > correio electr=F3nico. This e-mail and any attachment is for =20 > authorised use by the intended recipient(s) only. It may contain =20 > proprietary material, confidential information and/or be subject to =20= > legal privilege. It should not be copied, disclosed to, retained or =20= > used by, any other party. If you are not an intended recipient then =20= > please promptly delete this e-mail and any attachment and all copies =20= > and inform the sender. Thank you. > > > Please help Logica to respect the environment by not printing this =20 > email / Pour contribuer comme Logica au respect de l'environnement, =20= > merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht =20= > nicht aus und helfen Sie so Logica dabei die Umwelt zu schuetzen / =20 > Por favor ajude a Logica a respeitar o ambiente n=E3o imprimindo este =20= > correio electr=F3nico. This e-mail and any attachment is for =20 > authorised use by the intended recipient(s) only. It may contain =20 > proprietary material, confidential information and/or be subject to =20= > legal privilege. It should not be copied, disclosed to, retained or =20= > used by, any other party. If you are not an intended recipient then =20= > please promptly delete this e-mail and any attachment and all copies =20= > and inform the sender. Thank you. --Apple-Mail-8-114018789 Content-Type: text/html; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable
On Apr 22, 2009, = at 1:19 AM, Villemos, Gert wrote:

I=92m trying to understand how to = setup logging using log4j with Geronimo. Found the article http://cwiki.apache.org/GMOxDOC21/configuring-application-specific-loggi= ng-with-log4j.html but I miss an explanation = of the concepts behind the logging. Likely the problem I have with = implementing the logging following the article are due to this missing = understanding. Before bothering anyone with my faulty source code I = would therefore like to know whether I have understood the concepts = correctly;
 
1. Each deployed WAR can maintain separate log file(s), by = including a =91log4j.properties=92 file in the WAR and a definition of = where to unpack it in the =91geronimo-web.xml=92 deployment = file.You also need = a geronimo plan for the war with = an ApplicationLog4jConfigurationGBean gbean to tell log4j = about the special configuration for the war's = logging.
 
[Gert] I = thought the =91geronimo-web.xml=92 was the Geronimo plan for the war, = i.e. I have inserted the ApplicationLog4= jConfigurationGBean bean in this file=85 do I need another file as = well?

that is the geronimo plan, and you don't need any other = file.
 


2. The =91{GERONIMO_HOME}/var/log/server-log4j.properties=92 = file defines the log4j setup for the Geronimo server. When deploying = WARs with their own log4j.properties files I do NOT have to change this = file to make them work, the GBean =91=92 will manage this for = me.yes.  If = you don't do anything your app's logging will also end up in this server = log file.  You only need to follow the doc instructions if you want = your app's logging to go to a separate file from the normal server = logging.
 
[Gert] So = if I don=92t do anything I should see my log messages in the default log = (=85 I dont). And if I follow the instructions on http://cwiki.apache.org/GMOxDOC21/configuring-application-specific-loggi= ng-with-log4j.html I= should see them somewhere else.


3. The log files can be viewed from the administration console = through the =91server log=92 portlet, and the =91Filter Criteria=92 drop = down box will contain each registered log file.I don't know = if you can look at other log files using the console log = viewer.
 
[Gert] Ok=85 = I=92ll try and see=85 just wondered why there is a drop down box on the = log viewer. Seems to indicate that you can have multiple = logs.

good point :-)

thanks
david = jencks
 
hope this = helps
david = jencks


 
Thanks,
Gert.
 

Please help Logica to respect the environment by not = printing this email / Pour contribuer comme Logica au respect de = l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie = diese Nachricht nicht aus und helfen Sie so Logica dabei die Umwelt zu = schuetzen / Por favor ajude a Logica a respeitar o ambiente n=E3o = imprimindo este correio electr=F3nico. This e-mail and any attachment is = for authorised use by the intended recipient(s) only. It may contain = proprietary material, confidential information and/or be subject to = legal privilege. It should not be copied, disclosed to, retained or used = by, any other party. If you are not an intended recipient then please = promptly delete this e-mail and any attachment and all copies and inform = the sender. Thank = you.
Please = help Logica to respect the environment by not printing this email / Pour = contribuer comme Logica au respect de l'environnement, merci de ne pas = imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und = helfen Sie so Logica dabei die Umwelt zu schuetzen / Por favor ajude a = Logica a respeitar o ambiente n=E3o imprimindo este correio electr=F3nico.= This e-mail and any attachment is for authorised use by the intended = recipient(s) only. It may contain proprietary material, confidential = information and/or be subject to legal privilege. It should not be = copied, disclosed to, retained or used by, any other party. If you are = not an intended recipient then please promptly delete this e-mail and = any attachment and all copies and inform the sender. Thank = you.

= --Apple-Mail-8-114018789--