RE: addEventlistener question
"David R Robison" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <002701c2e290$3c087370$0864a8c0@D901K911> |
This problem seems to be related to running from Enhydra. When I run with Tomcat, the logging works normally. David R Robison Open Roads Consulting, Inc. http://www.openroadsconsulting.com -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Jacob Kjome Sent: Tuesday, March 04, 2003 11:46 AM To: [email protected] Subject: RE: [Barracuda] addEventlistener question At 10:11 AM 3/4/2003 -0500, you wrote: 4) I'm having trouble getting log4j to find any appenders. I used the web.xml and log4j.xml from the latest BarracudaDiscRack as an example. I tried to sepecify logging of debug message, but I got nothing conclusive. Make sure you modify the log4j.xml. Note that the FileAppender is set up with a dynamic variable: "${BarracudaDiscRack.log.home}". Change "BarracudaDiscRack" to the name of your context. For instance, if your context path is "/myapp", then it would be "${myapp.log.home}". Look at sample.log4j.xml in BarracudaDiscRack and notice that this value is dynamically generated by the build using a filter copy of sample.log4j.xml to log4j.xml. Now, in the web.xml, make sure that you have.... <listener> <listener-class> org.apache.log4j.servlet.InitContextListener </listener-class> </listener> That listener class will determine the location of the [context name].log.home variable dynamically. Output will go to file if you haven't changed the <appender-ref ref="A2"/> in the <root> logger. Make sure to add your other loggers to the log4j.xml if you want things logged. You can also change this at runtime since confgureAndWatch is done by default. Additionally, you can put the barracuda-config.jar in your app and add the following to your event-gateway.xml file... <event-gateway class="org.enhydra.barracuda.config.BarracudaConfig" /> Then you can go to http://localhost:8080/myapp/GetBConfig.event You can now turn on and off various loggers and set different levels. Let me know if you still have problems logging. Jake