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