[openrtm-commit:01727] r543 - trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/src/jp/go/aist/rtm/rtcbuilder/python

openrtm @ openrtm.org openrtm @ openrtm.org
2016年 2月 21日 (日) 02:37:01 JST


Author: ga
Date: 2016-02-21 02:37:01 +0900 (Sun, 21 Feb 2016)
New Revision: 543

Modified:
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/src/jp/go/aist/rtm/rtcbuilder/python/RtcBuilderPythonPlugin.java
Log:
Modified Logger #3211

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/src/jp/go/aist/rtm/rtcbuilder/python/RtcBuilderPythonPlugin.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/src/jp/go/aist/rtm/rtcbuilder/python/RtcBuilderPythonPlugin.java	2016-02-20 17:36:53 UTC (rev 542)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/src/jp/go/aist/rtm/rtcbuilder/python/RtcBuilderPythonPlugin.java	2016-02-20 17:37:01 UTC (rev 543)
@@ -1,17 +1,20 @@
 package jp.go.aist.rtm.rtcbuilder.python;
 
-import java.util.logging.Logger;
+import jp.go.aist.rtm.toolscommon.profiles.util.LoggerUtil;
 
-import jp.go.aist.rtm.rtcbuilder.RtcBuilderPlugin;
-
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.BundleContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The activator class controls the plug-in life cycle
  */
 public class RtcBuilderPythonPlugin extends AbstractUIPlugin {
 
+	private static final Logger LOGGER = LoggerFactory
+			.getLogger(RtcBuilderPythonPlugin.class);
+
 	// The plug-in ID
 	public static final String PLUGIN_ID = "jp.go.aist.rtm.rtcbuilder.python";
 
@@ -22,8 +25,10 @@
 	 * The constructor
 	 */
 	public RtcBuilderPythonPlugin() {
+		LoggerUtil.setup();
+		LOGGER.trace("RtcBuilderPythonPlugin: START");
+
 		plugin = this;
-		getLogger();
 	}
 
 	/*
@@ -31,8 +36,6 @@
 	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
 	 */
 	public void start(BundleContext context) throws Exception {
-		RtcBuilderPlugin.addLogger(getLogger());
-		//
 		super.start(context);
 	}
 
@@ -41,8 +44,6 @@
 	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
 	 */
 	public void stop(BundleContext context) throws Exception {
-		RtcBuilderPlugin.removeLogger(getLogger());
-		//
 		plugin = null;
 		super.stop(context);
 	}
@@ -56,13 +57,4 @@
 		return plugin;
 	}
 
-	static Logger log;
-
-	public static Logger getLogger() {
-		if (log == null) {
-			log = Logger.getLogger(PLUGIN_ID);
-		}
-		return log;
-	}
-
 }



More information about the openrtm-commit mailing list