User: starksm
Date: 01/04/24 16:25:11
Modified: src/main/org/jboss/util ServiceMBeanSupport.java
Log:
Switch to log4j based Category logging with the Category name
derived from the server getName() value.
Revision Changes Path
1.12 +7 -2 jboss/src/main/org/jboss/util/ServiceMBeanSupport.java
Index: ServiceMBeanSupport.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/util/ServiceMBeanSupport.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ServiceMBeanSupport.java 2001/04/22 20:02:35 1.11
+++ ServiceMBeanSupport.java 2001/04/24 23:25:11 1.12
@@ -13,8 +13,11 @@
import javax.management.MBeanRegistration;
import javax.management.MBeanServer;
import javax.management.ObjectName;
+
+import org.apache.log4j.Category;
import org.jboss.logging.Log;
+import org.jboss.logging.LogToCategory;
/** An abstract base class JBoss services can subclass to implement a
service that conforms to the ServiceMBean interface. Subclasses must
@@ -27,7 +30,7 @@
@author Rickard �berg ([EMAIL PROTECTED])
@author [EMAIL PROTECTED]
-@version $Revision: 1.11 $
+@version $Revision: 1.12 $
*/
public abstract class ServiceMBeanSupport
extends NotificationBroadcasterSupport
@@ -38,6 +41,7 @@
private MBeanServer server;
private int id = 0;
protected Log log;
+ protected Category category;
// Static --------------------------------------------------------
@@ -62,7 +66,8 @@
public void init()
throws Exception
{
- log = Log.createLog( getName() );
+ category = Category.getInstance(getName());
+ log = new LogToCategory(category);
log.log("Initializing");
log.setLog(log);
try
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development