Robert,
I have attached two versions of jboss.conf, one is the original version that does not use the log4j.properties file and the other is my version that uses the log4j.properties file (the shorter one of the two).
You can then use the log4j.properties file to configure the settings for your loggers and categories, have a look at the property file documentation at http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurator.html#doConfigure(java.lang.String,%20org.apache.log4j.Hierarchy). The advantage of this is the configuration is outside of your code and therefore can be changed easier. Also you don't need any extra custom classes in your code.
After you have done this all you need to do is use the Category.getInstance method to get your categories.
Paul
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED]
Sent: 20 June 2001 21:15
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Log4j & JBoss - HowTo?
I'm running JBoss 2.2.1 & Jetty 3.1 RC4.
Right now we use our own object (called ServerLog), which implements log4j, to do
all of our logging. I know that I can turn on the log4j service in the jboss.conf file, but
1) I'm not sure what this gives me, other than the JMX interface into it, and
2) how do I tie into the service??
When JBoss starts the service, does it bind something into JNDI that I can pull out
for use wherever I need it?? Does it provide some class that I can use in place of our
ServerLog class??
In looking through the archives, there was a lot of talk on how to configure JBoss, get
log4j running, yada yada yada. But I failed to find anything on what the service is and
what does it buy me, nor how to actually use it.
So, call me clueless, but I need your help.
Robert
jboss.conf