[jboss-user] [Beginners Corner] - Logging question (repository selector with local and global
do-not-reply at jboss.com
Mon Jan 22 10:18:50 EST 2007
I have a question regarding logging with log4j. I used the example repositoryselector.zip (http://wiki.jboss.org/wiki/Wiki.jsp?page=Logging) from the Wiki Knowledge Base to enable logging on a per-webapp basis, i.e. now I can use a log4j.xml file for each deployment I have. This works fine so far. The problem I have now is that all logging messages are written to the appenders I specified in those 'local' log4j.xml file. How would I be able to specify that only some logging messages are written to the 'local' logging-file while others are still written, say, to the server.log? Is there a way to access the 'global' specified appender "FILE" from the JBoss\conf\log4j.xml file?
To make it a bit more precise, say, I have two classes A and B deployed as mydeployment application. Within the log4j.xml file below mydeployment I would like to specify that logging msgs from class A are written to a 'local' log-file (say classA.log), while logging messages from class B are written to the server.log (the server.log that is specified in JBoss\conf\log4j.xml). The example in repositoryselector.zip shows me only how to log either all msgs to server.log or to the 'local' specified log-file. Please note that the logging messages should appear only once, i.e. either in the server.log file xor in the 'local' log-file. Is there a way to do this by configuration, or will I need to change the repository selector implementation? Anyway a detailed answer would be appreciated.
Thank you very much for your time and help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4004846#4004846
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4004846
More information about the jboss-user