Re: AW: Re: AW: Re: log4j
"Guillaume Sauthier (OW2)" <[email protected]> Mon, 23 Jan 2012 08:58:04 +0100
| Newsgroups | gmane.comp.java.objectweb.jonas |
|---|---|
| Message-ID | <CAG1yf3NeVFMUz=Usd=HAB956R77mQyh5_=DvBR67SS6D-9zcTQ@mail.gmail.com> |
--f46d04389223ec217104b72d6329 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable It should work if you place your log4j.jar in lib/ext/ BTW, can I ask you why do you want to change the logging system ? Thanks --G 2012/1/23 Schuch, Mathias (Mathias) <[email protected]> > Yes, I want to change the underlying server logging system but I=92m not > sure which configuration file I have to use.**** > > ** ** > > Thanks**** > > Mathias**** > > ** ** > > *Von:* [email protected] [mailto:[email protected]] *Im > Auftrag von *Guillaume Sauthier (OW2) > *Gesendet:* Freitag, 20. Januar 2012 09:44 > *An:* [email protected] > *Betreff:* [jonas] Re: AW: Re: log4j**** > > ** ** > > Monolog is mostly for the application server logging.**** > > By default, it's relying on the JDK's logging system.**** > > The property you want to change is used to replace that underlying loggin= g > system with another one, BUT still using the same configuration file > (trace.properties).**** > > Is that what you want to do ?**** > > ** ** > > If you simply want to use log4j for your application, I suggest to simply > put your log4j.jar inside your app (lib/ if is an Ear or WEB-INF/lib/ if = is > a Webapp). I also advise you to init your Log4j by hand using a > ServletContextListener.**** > > Here are some examples:**** > > http://www.javatastic.com/2007/08/22/initialize-log4j-in-a-web-applicatio= n/ (watch > the config file)**** > > http://blog.idleworx.com/2010/01/setting-up-log4j-for-simple-java-web.htm= l (read > 1 time the log4j configuration) > > Thanks**** > > --G**** > > 2012/1/19 Schuch, Mathias (Mathias) <[email protected]>**** > > My JOnAS version is 5.1.5.**** > > **** > > Regards Mathias**** > > **** > > *with **J** regards** > mit **J** Gr=FC=DFen ***** > > > <http://www.avaya.de/> > Mathias Schuch | Unified Server Applications | > Avaya GmbH & Co KG | Kleyerstra=DFe 94 | 60326 Frankfurt | > Voice: +49 69 7505 6064 | Fax: +49 69 7505 56064 | > Email: *[email protected]** ***** <http://www.avaya.de/> > > <http://www.avaya.de/> > Sitz der Gesellschaft: Frankfurt/Main > Registergericht: Amtsgericht Frankfurt/Main - HRA 29419 > Pers. haftender Gesellschafter: Avaya Verwaltungs GmbH in Frankfurt/Main > Registergericht: Amtsgericht Frankfurt/Main - HRB 76816 > Gesch=E4ftsf=FChrer: Markus Ernesti, Dr. Wolfgang Runge, Wolfgang Zorn > > Erreichen Sie den richtigen Avaya Ansprechpartner mit kostenfreien > Rufnummern: > Tel: 0800-GOAVAYA =3D 0800 46 28 29 2 | Fax: 0800-AVAYAFAX =3D 0800 28 29= 23 > 29 > > Ihr direkter Zugang zu unserem Kundenportal MeinAvaya: *www.meinavaya.de > * > <http://www.avaya.de/> > * > > * > [ Bitte denken Sie =FCber Ihre Verantwortung gegen=FCber der Umwelt nach, > bevor Sie diese E-Mail ausdrucken! ]**** > > **** > > *Von:* *[email protected]* [mailto:*[email protected]*] *Im > Auftrag von *Guillaume Sauthier (OW2) > *Gesendet:* Donnerstag, 19. Januar 2012 12:03 > *An:* *[email protected]* > *Betreff:* [jonas] Re: log4j**** > > **** > > What is your version of JOnAS ?**** > > --G**** > > 2012/1/17 <*[email protected]*>**** > > Hi, > > i want to use log4j with JOnAS. I follow the configuration guide and putt > the > log4j.properties in $JONAS_BASE/conf and log4j jar file in > $JONAS_BASE/lib/commons. > If I now uncomment in trace.properties the wrapper: > "log.config.classname > org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory" > and comment the wrapper: > "log.config.classname > org.objectweb.util.monolog.wrapper.javaLog.LoggerFactory" > I get the following execption: > "Cannot get LoggerFactory:java.lang.ClassNotFoundException: > org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory" > > What am I doing wrong? > > Thanks > Mathias**** > > **** > > ** ** > <http://www.avaya.de/> > > --f46d04389223ec217104b72d6329 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable It should work if you place your log4j.jar in lib/ext/<div><br></div><div>B= TW, can I ask you why do you want to change the logging system ?</div><div>= <br></div><div>Thanks</div><div>--G<br><br><div class=3D"gmail_quote">2012/= 1/23 Schuch, Mathias (Mathias) <span dir=3D"ltr"><<a href=3D"mailto:msch= [email protected]">[email protected]</a>></span><br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> <div lang=3D"DE" link=3D"blue" vlink=3D"purple"><div><p class=3D"MsoNormal"= ><span lang=3D"EN-US" style=3D"font-size:11.0pt;font-family:"Arial&quo= t;,"sans-serif";color:#1f497d">Yes, I want to change the underlyi= ng server logging system but I=92m not sure which configuration file I have= to use.<u></u><u></u></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;font-= family:"Arial","sans-serif";color:#1f497d"><u></u>=A0<u= ></u></span></p><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-s= ize:11.0pt;font-family:"Arial","sans-serif";color:#1f49= 7d">Thanks<u></u><u></u></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;font-= family:"Arial","sans-serif";color:#1f497d">Mathias<u></= u><u></u></span></p><p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;= font-family:"Arial","sans-serif";color:#1f497d"><u></u>= =A0<u></u></span></p> <div style=3D"border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm = 0cm 0cm"><p class=3D"MsoNormal"><b><span style=3D"font-size:10.0pt;font-fam= ily:"Tahoma","sans-serif"">Von:</span></b><span style= =3D"font-size:10.0pt;font-family:"Tahoma","sans-serif""= > <a href=3D"mailto:[email protected]" target=3D"_blank">guillaume.ow= [email protected]</a> [mailto:<a href=3D"mailto:[email protected]" target= =3D"_blank">[email protected]</a>] <b>Im Auftrag von </b>Guillaume Sa= uthier (OW2)<br> <b>Gesendet:</b> Freitag, 20. Januar 2012 09:44<br><b>An:</b> <a href=3D"ma= ilto:[email protected]" target=3D"_blank">[email protected]</a><br><b>Betreff:</b> = [jonas] Re: AW: Re: log4j<u></u><u></u></span></p></div><div class=3D"im"><= p class=3D"MsoNormal"> <u></u>=A0<u></u></p><p class=3D"MsoNormal">Monolog is mostly for the appli= cation server logging.<u></u><u></u></p><div><p class=3D"MsoNormal">By defa= ult, it's relying on the JDK's logging system.<u></u><u></u></p></d= iv> <div><p class=3D"MsoNormal">The property you want to change is used to repl= ace that underlying logging system with another one, BUT still using the sa= me configuration file (trace.properties).<u></u><u></u></p></div><div><p cl= ass=3D"MsoNormal"> Is that what you want to do ?<u></u><u></u></p></div></div><div><div class= =3D"im"><p class=3D"MsoNormal"><u></u>=A0<u></u></p><div><p class=3D"MsoNor= mal">If you simply want to use log4j for your application, I suggest to sim= ply put your log4j.jar inside your app (lib/ if is an Ear or WEB-INF/lib/ i= f is a Webapp). I also advise you to init your Log4j by hand using a Servle= tContextListener.<u></u><u></u></p> </div><div><p class=3D"MsoNormal">Here are some examples:<u></u><u></u></p>= </div><div><p class=3D"MsoNormal"><a href=3D"http://www.javatastic.com/2007= /08/22/initialize-log4j-in-a-web-application/" target=3D"_blank">http://www= .javatastic.com/2007/08/22/initialize-log4j-in-a-web-application/</a>=A0(wa= tch the config file)<u></u><u></u></p> </div><div><p class=3D"MsoNormal"><a href=3D"http://blog.idleworx.com/2010/= 01/setting-up-log4j-for-simple-java-web.html" target=3D"_blank">http://blog= .idleworx.com/2010/01/setting-up-log4j-for-simple-java-web.html</a>=A0(read= 1 time the log4j configuration)<br> <br>Thanks<u></u><u></u></p></div></div><div><p class=3D"MsoNormal" style= =3D"margin-bottom:12.0pt">--G<u></u><u></u></p><div><div class=3D"im"><p cl= ass=3D"MsoNormal">2012/1/19 Schuch, Mathias (Mathias) <<a href=3D"mailto= :[email protected]" target=3D"_blank">[email protected]</a>><u></u><u></= u></p> </div><div><div><div class=3D"im"><p class=3D"MsoNormal"><span lang=3D"EN-U= S" style=3D"font-size:11.0pt;font-family:"Arial","sans-serif= ";color:#1f497d">My JOnAS version is 5.1.5.</span><u></u><u></u></p><p= class=3D"MsoNormal"> <span lang=3D"EN-US" style=3D"font-size:11.0pt;font-family:"Arial"= ;,"sans-serif";color:#1f497d">=A0</span><u></u><u></u></p><p clas= s=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;font-family:= "Arial","sans-serif";color:#1f497d">Regards Mathias</sp= an><u></u><u></u></p> <p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;font-= family:"Arial","sans-serif";color:#1f497d">=A0</span><u= ></u><u></u></p></div><div><div class=3D"im"><p class=3D"MsoNormal"><b><i><= span style=3D"font-size:10.0pt;font-family:"Lucida Sans Unicode",= "sans-serif";color:blue">with=A0 </span></i></b><b><i><span style= =3D"font-size:10.0pt;font-family:Wingdings;color:blue">J</span></i></b><b><= i><span style=3D"font-size:10.0pt;font-family:"Lucida Sans Unicode&quo= t;,"sans-serif";color:blue">=A0 regards</span></i></b><b><i><span= style=3D"font-size:10.0pt;font-family:"Lucida Sans Unicode",&quo= t;sans-serif""> <span style=3D"color:blue"><br> mit=A0 </span></span></i></b><b><i><span style=3D"font-size:10.0pt;font-fam= ily:Wingdings;color:blue">J</span></i></b><b><i><span style=3D"font-size:10= .0pt;font-family:"Lucida Sans Unicode","sans-serif";col= or:blue"> Gr=FC=DFen </span></i></b><u></u><u></u></p> </div><p class=3D"MsoNormal"><a href=3D"http://www.avaya.de/" target=3D"_bl= ank"><span style=3D"font-size:10.0pt;font-family:"Century Gothic"= ,"sans-serif";color:#1f497d;text-decoration:none"><br></span></a>= </p> <div class=3D"im"><a href=3D"http://www.avaya.de/" target=3D"_blank"><span = style=3D"font-size:10.0pt;font-family:"Century Gothic","sans= -serif";color:#999999;text-decoration:none">Mathias Schuch </span><spa= n style=3D"font-size:10.0pt;font-family:"Century Gothic","sa= ns-serif";color:#ff0018;text-decoration:none">|</span><span style=3D"f= ont-size:10.0pt;font-family:"Century Gothic","sans-serif&quo= t;;color:#999999;text-decoration:none"> Unified Server Applications </span>= <span style=3D"font-size:10.0pt;font-family:"Century Gothic",&quo= t;sans-serif";color:#ff0018;text-decoration:none">|<br> </span><span style=3D"font-size:10.0pt;font-family:"Century Gothic&quo= t;,"sans-serif";color:#999999;text-decoration:none">Avaya GmbH &a= mp; Co KG </span><span style=3D"font-size:10.0pt;font-family:"Century = Gothic","sans-serif";color:#ff0018;text-decoration:none">|</= span><span style=3D"font-size:10.0pt;font-family:"Century Gothic"= ,"sans-serif";color:#999999;text-decoration:none"> Kleyerstra=DFe= 94=A0</span><span style=3D"font-size:10.0pt;font-family:"Century Goth= ic","sans-serif";color:#ff0018;text-decoration:none">|</span= ><span style=3D"font-size:10.0pt;font-family:"Century Gothic",&qu= ot;sans-serif";color:#999999;text-decoration:none">=A060326 Frankfurt = </span><span style=3D"font-size:10.0pt;font-family:"Century Gothic&quo= t;,"sans-serif";color:#ff0018;text-decoration:none">|<br> </span><span style=3D"font-size:10.0pt;font-family:"Century Gothic&quo= t;,"sans-serif";color:#999999;text-decoration:none">Voice: +49 69= 7505 6064 </span><span style=3D"font-size:10.0pt;font-family:"Century= Gothic","sans-serif";color:#ff0018;text-decoration:none">|<= /span><span style=3D"font-size:10.0pt;font-family:"Century Gothic"= ;,"sans-serif";color:#999999;text-decoration:none"> Fax:=A0 +49 6= 9 7505 56064 </span><span style=3D"font-size:10.0pt;font-family:"Centu= ry Gothic","sans-serif";color:#ff0018;text-decoration:none">= |<br> </span><span style=3D"font-size:10.0pt;font-family:"Century Gothic&quo= t;,"sans-serif";color:#999999;text-decoration:none">Email:</span>= <span style=3D"font-size:10.0pt;font-family:"Arial","sans-se= rif";color:#999999;text-decoration:none"> </span><span style=3D"font-f= amily:"Century Gothic","sans-serif";color:#999999;text-= decoration:none"><u><span style=3D"font-size:10.0pt;color:gray">mschuch@ava= ya.com</span></u><u><span style=3D"font-size:10.0pt;font-family:"Arial= ","sans-serif";color:blue"> </span></u></span><span style=3D= "color:windowtext;text-decoration:none"><u></u><u></u></span></a></div> <p></p><p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:&= quot;Century Gothic","sans-serif";color:#999999"><a href=3D"= http://www.avaya.de/" target=3D"_blank"></a></span></p><div class=3D"im"><a= href=3D"http://www.avaya.de/" target=3D"_blank"><span style=3D"color:#9999= 99;text-decoration:none">Sitz der Gesellschaft: Frankfurt/Main<br> Registergericht: Amtsgericht Frankfurt/Main - HRA 29419<br>Pers. haftender = Gesellschafter: Avaya Verwaltungs GmbH in Frankfurt/Main<br>Registergericht= : Amtsgericht Frankfurt/Main - HRB 76816<br>Gesch=E4ftsf=FChrer: Markus Ern= esti, Dr. Wolfgang Runge, Wolfgang Zorn<br> <br>Erreichen Sie den richtigen Avaya Ansprechpartner mit kostenfreien Rufn= ummern: <br>Tel: 0800-GOAVAYA =3D 0800 46 28 29 2 </span><span style=3D"col= or:#ff0033;text-decoration:none">|</span><span style=3D"color:#999999;text-= decoration:none"> Fax: 0800-AVAYAFAX =3D 0800 28 29 23 29<br> <br>Ihr direkter Zugang zu unserem Kundenportal MeinAvaya: <u><span style= =3D"color:blue">www.meinavaya.de<br></span></u><br></span></a></div><a href= =3D"http://www.avaya.de/" target=3D"_blank"><span style=3D"font-size:12.0pt= ;font-family:"Times New Roman","serif";color:windowtext= ;text-decoration:none"><span style=3D"font-size:10.0pt;font-family:"Ce= ntury Gothic","sans-serif";color:#999999"><u><span style=3D"= color:blue"><br> <br></span></u></span><div class=3D"im"><span style=3D"font-size:7.5pt;font= -family:"Century Gothic","sans-serif";color:#009900">[ = Bitte denken Sie =FCber Ihre Verantwortung gegen=FCber der Umwelt nach, bev= or Sie diese E-Mail ausdrucken! ]</span><u></u><u></u><p class=3D"MsoNormal= "> <span style=3D"font-size:11.0pt;font-family:"Arial","sans-se= rif";color:#1f497d">=A0</span><u></u><u></u></p><div style=3D"border:n= one;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class=3D"M= soNormal"> <b><span style=3D"font-size:10.0pt;font-family:"Tahoma","san= s-serif"">Von:</span></b><span style=3D"font-size:10.0pt;font-family:&= quot;Tahoma","sans-serif""> <u><span style=3D"color:blue">gu= [email protected]</span></u> [mailto:<u><span style=3D"color:blue">guil= [email protected]</span></u>] <b>Im Auftrag von </b>Guillaume Sauthier (O= W2)<br> <b>Gesendet:</b> Donnerstag, 19. Januar 2012 12:03<br><b>An:</b> <u><span s= tyle=3D"color:blue">[email protected]</span></u><br><b>Betreff:</b> [jonas] Re:= log4j</span><u></u><u></u></p></div><div><div><p class=3D"MsoNormal">=A0<u= ></u><u></u></p> <p class=3D"MsoNormal">What is your version of JOnAS ?<u></u><u></u></p><di= v><p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt">--G<u></u><u></u></= p><div><p class=3D"MsoNormal">2012/1/17 <<u><span style=3D"color:blue">m= [email protected]</span></u>><u></u><u></u></p> <p class=3D"MsoNormal">Hi,<br><br>i want to use log4j with JOnAS. I follow = the configuration guide and putt the<br>log4j.properties in $JONAS_BASE/con= f and log4j jar file in<br>$JONAS_BASE/lib/commons.<br>If I now uncomment i= n trace.properties the wrapper:<br> "log.config.classname<br>org.objectweb.util.monolog.wrapper.log4j.Mono= logLoggerFactory"<br>and comment the wrapper:<br>"log.config.clas= sname org.objectweb.util.monolog.wrapper.javaLog.LoggerFactory"<br> I get the following execption:<br>"Cannot get LoggerFactory:java.lang.= ClassNotFoundException:<br>org.objectweb.util.monolog.wrapper.log4j.Monolog= LoggerFactory"<br><br>What am I doing wrong?<br><br>Thanks<br>Mathias<= u></u><u></u></p> </div><p class=3D"MsoNormal">=A0<u></u><u></u></p></div></div></div><p clas= s=3D"MsoNormal"><u></u>=A0<u></u></p></div></span></a><p></p></div></div></= div></div></div></div></div></div></blockquote></div><br></div> --f46d04389223ec217104b72d6329--