-
1. Re: logging config for container managed logging
peterj Apr 4, 2010 10:40 AM (in response to rjcarr)Does this discussion help:
-
2. Re: logging config for container managed logging
rjcarr Apr 4, 2010 3:57 PM (in response to peterj)Hi Peter-
Thanks for the link, but if I'm reading it right, no ... it doesn't seem to answer my question.
It talks about putting log4j config files within your application, but I'm strictly trying to avoid that.
I want the container (jboss) to have complete control over the logging of my application. Right now I'm just talking about controlling the loggers and appenders in log4j, but as I said, I eventually want it to also control the log library that is used (when I switch to commons logging).
Is your link saying this isn't possible? Is there no way to completely control the logging config outside of the app that is doing the logging?
-
3. Re: logging config for container managed logging
jaikiran Apr 5, 2010 7:56 AM (in response to rjcarr)R Carr wrote:
I want the container (jboss) to have complete control over the logging of my application. Right now I'm just talking about controlling the loggers and appenders in log4j, but as I said, I eventually want it to also control the log library that is used (when I switch to commons logging).
Is your link saying this isn't possible? Is there no way to completely control the logging config outside of the app that is doing the logging?
If you want to configure the logging from outside your app, then configuring the JBOSS_HOME/server/< servername>/conf/jboss-log4j.xml should work. As for changing the log library, you can definitely use any other logging implementation. It's upto your application to package those jar files in the application and configure logging using some config file (each implementation will have different API to configure it).
-
4. Re: logging config for container managed logging
peterj Apr 5, 2010 10:57 AM (in response to jaikiran)>>Thanks for the link, but if I'm reading it right, no ... it doesn't seem to answer my question.
Actually, I was not answering your questions, except in perhaps a round-about way. The link contains a complete set of change to jboss-log4j.xml that enable an app to log to a seperate log file. So the link was really to help with this statement you made:
>>I added a new appender (with a debug priority) and a new category (named the base of my package structure) and restarted jboss. The file I specified in the appender was created, however, nothing was ever logged to it (and there should have been).