AW: Re: AW: Re: log4j
"Schuch, Mathias (Mathias)" <[email protected]> Mon, 23 Jan 2012 08:41:34 +0100
| Newsgroups | gmane.comp.java.objectweb.jonas |
|---|---|
| Message-ID | <DE368CC224A2DE449CB85627169F942D026D5CF0@307622ANEX4.global.avaya.com> |
This is a multi-part message in MIME format. ------_=_NextPart_001_01CCD9A2.6E4F3B0F Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Yes, I want to change the underlying server logging system but I'm not = sure which configuration file I have to use. =20 Thanks Mathias =20 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 =20 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 = logging system with another one, BUT still using the same configuration = file (trace.properties). Is that what you want to do ? =20 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. =20 Regards Mathias =20 with J regards=20 mit J Gr=FC=DFen=20 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/>=20 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:=20 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 [ Bitte denken Sie =FCber Ihre Verantwortung gegen=FCber der Umwelt = nach, bevor Sie diese E-Mail ausdrucken! ] <http://www.avaya.de/>=20 =20 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 =20 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 =20 =20 ------_=_NextPart_001_01CCD9A2.6E4F3B0F Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Diso-8859-1"> <html xmlns:v=3D"urn:schemas-microsoft-com:vml" = xmlns:o=3D"urn:schemas-microsoft-com:office:office" = xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" = xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta name=3DGenerator = content=3D"Microsoft Word 12 (filtered medium)"><style><!-- /* Font Definitions */ @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0;} @font-face {font-family:"MS Mincho"; panose-1:2 2 6 9 4 2 5 8 3 4;} @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} @font-face {font-family:"Century Gothic"; panose-1:2 11 5 2 2 2 2 2 2 4;} @font-face {font-family:"Lucida Sans Unicode"; panose-1:2 11 6 2 3 5 4 2 2 4;} @font-face {font-family:"\@MS Mincho"; panose-1:2 2 6 9 4 2 5 8 3 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} p.MsoAcetate, li.MsoAcetate, div.MsoAcetate {mso-style-priority:99; mso-style-link:"Sprechblasentext Zchn"; margin:0cm; margin-bottom:.0001pt; font-size:8.0pt; font-family:"Tahoma","sans-serif";} span.SprechblasentextZchn {mso-style-name:"Sprechblasentext Zchn"; mso-style-priority:99; mso-style-link:Sprechblasentext; font-family:"Tahoma","sans-serif";} span.E-MailFormatvorlage19 {mso-style-type:personal-reply; font-family:"Arial","sans-serif"; color:#1F497D; font-weight:normal; font-style:normal;} .MsoChpDefault {mso-style-type:export-only;} @page WordSection1 {size:612.0pt 792.0pt; margin:70.85pt 70.85pt 2.0cm 70.85pt;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--></head><body lang=3DDE link=3Dblue = vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span = lang=3DEN-US = style=3D'font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'= >Yes, I want to change the underlying server logging system but = I’m not sure which configuration file I have to = use.<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US = style=3D'font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'= ><o:p> </o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US = style=3D'font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'= >Thanks<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US = style=3D'font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'= >Mathias<o:p></o:p></span></p><p class=3DMsoNormal><span = style=3D'font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'= ><o:p> </o:p></span></p><div style=3D'border:none;border-top:solid = #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=3DMsoNormal><b><span = style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Von:</span><= /b><span style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> = [email protected] [mailto:[email protected]] <b>Im Auftrag = von </b>Guillaume Sauthier (OW2)<br><b>Gesendet:</b> Freitag, 20. Januar = 2012 09:44<br><b>An:</b> [email protected]<br><b>Betreff:</b> [jonas] Re: = AW: Re: log4j<o:p></o:p></span></p></div><p = class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>Monolog is = mostly for the application server logging.<o:p></o:p></p><div><p = class=3DMsoNormal>By default, it's relying on the JDK's logging = system.<o:p></o:p></p></div><div><p class=3DMsoNormal>The property you = want to change is used to replace that underlying logging system with = another one, BUT still using the same configuration file = (trace.properties).<o:p></o:p></p></div><div><p class=3DMsoNormal>Is = that what you want to do ?<o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p><div><p class=3DMsoNormal>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.<o:p></o:p></p></div><div><p = class=3DMsoNormal>Here are some examples:<o:p></o:p></p></div><div><p = class=3DMsoNormal><a = href=3D"http://www.javatastic.com/2007/08/22/initialize-log4j-in-a-web-ap= plication/">http://www.javatastic.com/2007/08/22/initialize-log4j-in-a-we= b-application/</a> (watch the config = file)<o:p></o:p></p></div><div><p class=3DMsoNormal><a = href=3D"http://blog.idleworx.com/2010/01/setting-up-log4j-for-simple-java= -web.html">http://blog.idleworx.com/2010/01/setting-up-log4j-for-simple-j= ava-web.html</a> (read 1 time the log4j = configuration)<br><br>Thanks<o:p></o:p></p></div><div><p = class=3DMsoNormal = style=3D'margin-bottom:12.0pt'>--G<o:p></o:p></p><div><p = class=3DMsoNormal>2012/1/19 Schuch, Mathias (Mathias) <<a = href=3D"mailto:[email protected]" = target=3D"_blank">[email protected]</a>><o:p></o:p></p><div><div><p = class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-US = style=3D'font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'= >My JOnAS version is 5.1.5.</span><o:p></o:p></p><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-US = style=3D'font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > </span><o:p></o:p></p><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-US = style=3D'font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'= >Regards Mathias</span><o:p></o:p></p><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-US = style=3D'font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > </span><o:p></o:p></p><div><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><i><span = style=3D'font-size:10.0pt;font-family:"Lucida Sans = Unicode","sans-serif";color:blue'>with </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","sans-serif";color:blue'> = regards</span></i></b><b><i><span = style=3D'font-size:10.0pt;font-family:"Lucida Sans = Unicode","sans-serif"'> <span style=3D'color:blue'><br>mit = </span></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","sans-serif";color:blue'> Gr=FC=DFen = </span></i></b><o:p></o:p></p><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><a = href=3D"http://www.avaya.de/" target=3D"_blank"><span = style=3D'font-size:10.0pt;font-family:"Century = Gothic","sans-serif";color:#1F497D;text-decoration:none'><br></span><span= style=3D'font-size:10.0pt;font-family:"Century = Gothic","sans-serif";color:#999999;text-decoration:none'>Mathias Schuch = </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'> Unified Server = Applications </span><span style=3D'font-size:10.0pt;font-family:"Century = Gothic","sans-serif";color:#FF0018;text-decoration:none'>|<br></span><spa= n style=3D'font-size:10.0pt;font-family:"Century = Gothic","sans-serif";color:#999999;text-decoration:none'>Avaya GmbH = & 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 </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'> 60326 = Frankfurt </span><span style=3D'font-size:10.0pt;font-family:"Century = Gothic","sans-serif";color:#FF0018;text-decoration:none'>|<br></span><spa= n style=3D'font-size:10.0pt;font-family:"Century = Gothic","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: +49 = 69 7505 56064 </span><span = style=3D'font-size:10.0pt;font-family:"Century = Gothic","sans-serif";color:#FF0018;text-decoration:none'>|<br></span><spa= n style=3D'font-size:10.0pt;font-family:"Century = Gothic","sans-serif";color:#999999;text-decoration:none'>Email:</span><sp= an = style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#999999;= text-decoration:none'> </span><span style=3D'font-family:"Century = Gothic","sans-serif";color:#999999;text-decoration:none'><u><span = style=3D'font-size:10.0pt;color:gray'>[email protected]</span></u><u><spa= n = style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:blue'> = </span></u></span><span = style=3D'color:windowtext;text-decoration:none'><o:p></o:p></span></a></p= ><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = style=3D'font-size:10.0pt;font-family:"Century = Gothic","sans-serif";color:#999999'><a href=3D"http://www.avaya.de/" = target=3D"_blank"><span = style=3D'color:#999999;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 Ernesti, Dr. Wolfgang Runge, = Wolfgang Zorn<br><br>Erreichen Sie den richtigen Avaya Ansprechpartner = mit kostenfreien Rufnummern: <br>Tel: 0800-GOAVAYA =3D 0800 46 28 29 2 = </span><span style=3D'color:#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><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:"Century = Gothic","sans-serif";color:#999999'><u><span = style=3D'color:blue'><br><br></span></u></span><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, bevor Sie diese E-Mail = ausdrucken! ]</span><o:p></o:p><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = style=3D'font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > </span><o:p></o:p></p><div style=3D'border:none;border-top:solid = #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span = style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Von:</span><= /b><span style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> = <u><span style=3D'color:blue'>[email protected]</span></u> = [mailto:<u><span = style=3D'color:blue'>[email protected]</span></u>] <b>Im Auftrag = von </b>Guillaume Sauthier (OW2)<br><b>Gesendet:</b> Donnerstag, 19. = Januar 2012 12:03<br><b>An:</b> <u><span = style=3D'color:blue'>[email protected]</span></u><br><b>Betreff:</b> [jonas] = Re: log4j</span><o:p></o:p></p></div><div><div><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p><= /o:p></p><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>What is = your version of JOnAS ?<o:p></o:p></p><div><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;margin-bottom:12.0pt'>--G<o:p></o:p></p>= <div><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>2012/1/17 = <<u><span = style=3D'color:blue'>[email protected]</span></u>><o:p></o:p></p><p = class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Hi,<br><br>i= want to use log4j with JOnAS. I follow the configuration guide and putt = the<br>log4j.properties in $JONAS_BASE/conf and log4j jar file = in<br>$JONAS_BASE/lib/commons.<br>If I now uncomment in trace.properties = the = wrapper:<br>"log.config.classname<br>org.objectweb.util.monolog.wrap= per.log4j.MonologLoggerFactory"<br>and comment the = wrapper:<br>"log.config.classname = org.objectweb.util.monolog.wrapper.javaLog.LoggerFactory"<br>I get = the following execption:<br>"Cannot get = LoggerFactory:java.lang.ClassNotFoundException:<br>org.objectweb.util.mon= olog.wrapper.log4j.MonologLoggerFactory"<br><br>What am I doing = wrong?<br><br>Thanks<br>Mathias<o:p></o:p></p></div><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p><= /o:p></p></div></div></div><p = class=3DMsoNormal><o:p> </o:p></p></span></a></span></p></div></div>= </div></div></div></div></div></body></html> ------_=_NextPart_001_01CCD9A2.6E4F3B0F--