1 of 1 people found this helpful
That is the exact same text I use for one of my servers (well, the sizes are different), and it works for me. So there must be something else going on. Things I would verify or try:
a) Make sure that I edited the correct file. This usually involves hidding all of the other directories under jboss_home/server except for the one I am using.
a2) Make sure I edited the file correctly by opening it in an editor that will validate it against the schema.
b) Do a text file search for "<appender", make sure it shows up in only the one file.
c) Change the logging level on the console log, see if I get more/less output.
d) Delete the file and see what happens.
Peter, thank you, your response pointed me in the right direction. Here's how I solved the problem;
I had edited the correct file, "/server/default/conf/jboss-log4j.xml", but I could not validate it as it could not find the log4j.dtd file. Researching online I found that I could extract that file from log4j.jar in the "/common/lib" folder. After extracting log4j.dtd to the "server/default/conf" folder I was able to successfully deduce the problem. I had commented out the original DailyRollingFileAppender block and, in an effort to maintain the original comments within the block, simply removed part of the inner comments closing tags (i.e. '-->' became '->'). This was causing an unseen 'Incorrect syntax' error. When I modified the inner comments beginning tags from '<!--' to '<!-' the problem resolved itself and logging occurred as expected.
You don't need a dtd for that. The minimal XML check can be done by an editor like JEdit or Eclipse