Update: I have add the following properties to my standalone.sh after placing the log4j.xml under my standalone/configuration directory:
and now I have different error messages:
18:44:31,989 ERROR [stderr] (MSC service thread 1-6) log4j:WARN No appenders could be found for logger (com.abc.mbean.ListenerImpl).
18:44:31,990 ERROR [stderr] (MSC service thread 1-6) log4j:WARN Please initialize the log4j system properly.
Since, I am deploying SAR, not WAR or EAR, so I don't have any classes or lib folder. But then again, I have already tired place the log4j.xml under META-INF or pack it as a jar and add that to jboss-deployment-structure.xml. None works unfortunately.
Thanks in advance for your help!
Why NOT use JBoss logging and forget Log4j(it is complicated(at least NOT easy) to config it in both JBoss AS 7 and Glassfish 3+, because both container invented their own logger)?
(Or use JDK Logging?)
JBoss logging is good enough.
The reason is we have different appender implementation based on different business requirement (ie certain modules' logging is based on count, while some are based on size or day of the week, etc.)
BTW, I would also like to know if JBoss 7 allow exclusions of module dependency under modules. From the DTD it seems there's no way to exclude anything, but would like to confirm. Thanks!