Hi all. I'm trying to use Log4j with Jboss. I read that log4j.xml properties file must be in server/all/conf, so I put it there. Now I have a couple of questios:
- do I have to add a line like this (DOMConfigurator.configure("log4j.xml") in my program?
-where does it place the log file?
-is this log4j.xml file correct?:
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<root> <priority value ="debug"/> <appender-ref ref="appender"/> </root> </log4j:configuration>
Thanks in advance Regards from Spain
Jeff Shelley
Ranch Hand
Joined: May 21, 2003
Posts: 70
posted
0
whic version of jboss are you running? you shouldn't need to write any code for configuration.
the log file will go in server/${whichever-configuration-you-are-running}/log/
Also, the log4j.xml that my jboss came with (3.2.3/tomcat-4.1.24) was a good starting point for my logging. I've never used the all configuration, just the default, so my log4j.xml is in the ${jboss-folder}/server/default/conf/ directory. if you never changed which configuration to run, that's where you'll find the log4j.xml. this is assuming you're running jboss 3.2.3.
It's almost Friday
Jeff Garrison
Greenhorn
Joined: Apr 09, 2004
Posts: 3
posted
0
This should do it for you. . .I had the same problem a few mos. back. I documented my results. Hope it helps.