More digging revealed that the flag "loader-repository-config" may have been broken in 3.2.5 and before. According to this bug report, the problem has been fixed in 3.2.6:
I'll download 3.2.6 tomorrow and report back here after running more tests.
No luck. :-(
A clean install of 3.2.6 exhibited the same behavior - the [Snoop] log messages go to the Console and not to the /logs/log4j-test.log file.
Based on another post I found here, I also tried setting two attributes in /server/default/deploy/jbossweb-tomcat50.sar/jboss-service.xml to false:
After restarting things, I got the same result.
At this point, I'm out of ideas and so my original questions remain:
Does anyone know if there anything else that needs to be configured in order for the Wiki example to work? What version of JBoss is required? Can anyone else get "Log4J.war" to log to its file rather than to the console?
Grrr... The two setting that didn't appear in my post above are:
<attribute name="Java2ClassLoadingCompliance">false</attribute> <attribute name="UseJBossWebLoader">false</attribute>
Sorry about that...
This may not be a great help, but I followed the instructions in the wiki and it worked fine for me.
Are you using log4j.properties? If so, you need to rename JBoss' log4j.xml file so log4j doesn't pick that up in preference to your log4j.properties. The wiki mentions how to do that. (Btw, I am using log4j.properties.)
Hope this helps.