Discussion:
log4j
m***@avaya.com
2012-01-17 09:53:04 UTC
Permalink
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
Guillaume Sauthier (OW2)
2012-01-19 11:03:13 UTC
Permalink
What is your version of JOnAS ?
--G
Post by m***@avaya.com
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.
"log.config.classname
org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory"
"log.config.classname
org.objectweb.util.monolog.wrapper.javaLog.LoggerFactory"
org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory"
What am I doing wrong?
Thanks
Mathias
Schuch, Mathias (Mathias)
2012-01-19 16:17:27 UTC
Permalink
My JOnAS version is 5.1.5.



Regards Mathias



with J regards
mit J Grüßen

<http://www.avaya.de/>
Mathias Schuch | Unified Server Applications |
Avaya GmbH & Co KG | Kleyerstraße 94 | 60326 Frankfurt |
Voice: +49 69 7505 6064 | Fax: +49 69 7505 56064 |
Email: ***@avaya.com <mailto:***@avaya.com>

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äftsführer: Markus Ernesti, Dr. Wolfgang Runge, Wolfgang Zorn

Erreichen Sie den richtigen Avaya Ansprechpartner mit kostenfreien Rufnummern:
Tel: 0800-GOAVAYA = 0800 46 28 29 2 | Fax: 0800-AVAYAFAX = 0800 28 29 23 29

Ihr direkter Zugang zu unserem Kundenportal MeinAvaya: www.meinavaya.de

<http://twitter.com/#!/Avaya_D> <http://www.facebook.com/AvayaDeutschland> <http://www.youtube.com/AvayaDeutschland> <http://www.xing.com/companies/avaya> <http://www.linkedin.com/companies/1494?trk=NUS_CMPY_FOL-co> <http://www.flickr.com/photos/avaya> <http://www.avaya.com/blogs>

<http://www.meinavaya.de> [ Bitte denken Sie über Ihre Verantwortung gegenüber der Umwelt nach, bevor Sie diese E-Mail ausdrucken! ]



Von: ***@gmail.com [mailto:***@gmail.com] Im Auftrag von Guillaume Sauthier (OW2)
Gesendet: Donnerstag, 19. Januar 2012 12:03
An: ***@ow2.org
Betreff: [jonas] Re: log4j



What is your version of JOnAS ?

--G

2012/1/17 <***@avaya.com>

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
Guillaume Sauthier (OW2)
2012-01-20 08:44:08 UTC
Permalink
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 ?

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-application/
(watch
the config file)
http://blog.idleworx.com/2010/01/setting-up-log4j-for-simple-java-web.html
(read
1 time the log4j configuration)

Thanks
--G
My JOnAS version is 5.1.5.****
** **
Regards Mathias****
** **
*with **J** regards** **
**mit **J** Grüßen ***
<http://www.avaya.de/>
Mathias Schuch | Unified Server Applications |
Avaya GmbH & Co KG | Kleyerstraße 94 | 60326 Frankfurt |
Voice: +49 69 7505 6064 | Fax: +49 69 7505 56064 |
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äftsführer: Markus Ernesti, Dr. Wolfgang Runge, Wolfgang Zorn
Tel: 0800-GOAVAYA = 0800 46 28 29 2 | Fax: 0800-AVAYAFAX = 0800 28 29 23 29
Ihr direkter Zugang zu unserem Kundenportal MeinAvaya: www.meinavaya.de
<http://twitter.com/#!/Avaya_D> <http://www.facebook.com/AvayaDeutschland><http://www.youtube.com/AvayaDeutschland><http://www.xing.com/companies/avaya><http://www.linkedin.com/companies/1494?trk=NUS_CMPY_FOL-co><http://www.flickr.com/photos/avaya><http://www.avaya.com/blogs>
<http://www.meinavaya.de>[ Bitte denken Sie über Ihre Verantwortung
gegenüber der Umwelt nach, bevor Sie diese E-Mail ausdrucken! ]****
** **
Auftrag von *Guillaume Sauthier (OW2)
*Gesendet:* Donnerstag, 19. Januar 2012 12:03
*Betreff:* [jonas] Re: log4j****
** **
What is your version of JOnAS ?****
--G****
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.
"log.config.classname
org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory"
"log.config.classname
org.objectweb.util.monolog.wrapper.javaLog.LoggerFactory"
org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory"
What am I doing wrong?
Thanks
Mathias****
** **
Schuch, Mathias (Mathias)
2012-01-23 07:41:34 UTC
Permalink
Yes, I want to change the underlying server logging system but I'm not sure which configuration file I have to use.



Thanks

Mathias



Von: ***@gmail.com [mailto:***@gmail.com] Im Auftrag von Guillaume Sauthier (OW2)
Gesendet: Freitag, 20. Januar 2012 09:44
An: ***@ow2.org
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 logging 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-application/ (watch the config file)

http://blog.idleworx.com/2010/01/setting-up-log4j-for-simple-java-web.html (read 1 time the log4j configuration)

Thanks

--G

2012/1/19 Schuch, Mathias (Mathias) <***@avaya.com>

My JOnAS version is 5.1.5.



Regards Mathias



with J regards
mit J Grüßen


Mathias Schuch | Unified Server Applications |
Avaya GmbH & Co KG | Kleyerstraße 94 | 60326 Frankfurt |
Voice: +49 69 7505 6064 | Fax: +49 69 7505 56064 |
Email: ***@avaya.com <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äftsführer: Markus Ernesti, Dr. Wolfgang Runge, Wolfgang Zorn

Erreichen Sie den richtigen Avaya Ansprechpartner mit kostenfreien Rufnummern:
Tel: 0800-GOAVAYA = 0800 46 28 29 2 | Fax: 0800-AVAYAFAX = 0800 28 29 23 29

Ihr direkter Zugang zu unserem Kundenportal MeinAvaya: www.meinavaya.de



[ Bitte denken Sie über Ihre Verantwortung gegenüber der Umwelt nach, bevor Sie diese E-Mail ausdrucken! ] <http://www.avaya.de/>



Von: ***@gmail.com [mailto:***@gmail.com] Im Auftrag von Guillaume Sauthier (OW2)
Gesendet: Donnerstag, 19. Januar 2012 12:03
An: ***@ow2.org
Betreff: [jonas] Re: log4j



What is your version of JOnAS ?

--G

2012/1/17 <***@avaya.com>

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
Guillaume Sauthier (OW2)
2012-01-23 07:58:04 UTC
Permalink
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
Yes, I want to change the underlying server logging system but I’m not
sure which configuration file I have to use.****
** **
Thanks****
Mathias****
** **
Auftrag von *Guillaume Sauthier (OW2)
*Gesendet:* Freitag, 20. Januar 2012 09:44
*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 logging
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-application/ (watch
the config file)****
http://blog.idleworx.com/2010/01/setting-up-log4j-for-simple-java-web.html (read
1 time the log4j configuration)
Thanks****
--G****
My JOnAS version is 5.1.5.****
****
Regards Mathias****
****
*with **J** regards**
mit **J** Grüßen *****
<http://www.avaya.de/>
Mathias Schuch | Unified Server Applications |
Avaya GmbH & Co KG | Kleyerstraße 94 | 60326 Frankfurt |
Voice: +49 69 7505 6064 | Fax: +49 69 7505 56064 |
<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äftsführer: Markus Ernesti, Dr. Wolfgang Runge, Wolfgang Zorn
Tel: 0800-GOAVAYA = 0800 46 28 29 2 | Fax: 0800-AVAYAFAX = 0800 28 29 23 29
Ihr direkter Zugang zu unserem Kundenportal MeinAvaya: *www.meinavaya.de
*
<http://www.avaya.de/>
*
*
[ Bitte denken Sie über Ihre Verantwortung gegenüber der Umwelt nach,
bevor Sie diese E-Mail ausdrucken! ]****
****
Auftrag von *Guillaume Sauthier (OW2)
*Gesendet:* Donnerstag, 19. Januar 2012 12:03
*Betreff:* [jonas] Re: log4j****
****
What is your version of JOnAS ?****
--G****
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.
"log.config.classname
org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory"
"log.config.classname
org.objectweb.util.monolog.wrapper.javaLog.LoggerFactory"
org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory"
What am I doing wrong?
Thanks
Mathias****
****
** **
<http://www.avaya.de/>
Loading...