geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanhongf...@apache.org
Subject svn commit: r1127423 - in /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src: ./ main/ main/java/ main/java/org/ main/java/org/apache/ main/java/org/apache/geronimo/ main/java/org/apache/geronimo/runtime/ main/java/o...
Date Wed, 25 May 2011 08:18:53 GMT
Author: hanhongfang
Date: Wed May 25 08:18:52 2011
New Revision: 1127423

URL: http://svn.apache.org/viewvc?rev=1127423&view=rev
Log:
add one missing file for GERONIMODEVTOOLS-748 Logging framework in GEP. 

Added:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src/main/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src/main/java/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src/main/java/org/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src/main/java/org/apache/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src/main/java/org/apache/geronimo/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src/main/java/org/apache/geronimo/runtime/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src/main/java/org/apache/geronimo/runtime/common/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src/main/java/org/apache/geronimo/runtime/common/log/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src/main/java/org/apache/geronimo/runtime/common/log/Logger.java
  (with props)

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src/main/java/org/apache/geronimo/runtime/common/log/Logger.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src/main/java/org/apache/geronimo/runtime/common/log/Logger.java?rev=1127423&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src/main/java/org/apache/geronimo/runtime/common/log/Logger.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src/main/java/org/apache/geronimo/runtime/common/log/Logger.java
Wed May 25 08:18:52 2011
@@ -0,0 +1,49 @@
+package org.apache.geronimo.runtime.common.log;
+
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.BundleContext;
+
+public class Logger extends Plugin{
+	private static ILog log;
+	public static int visitied;
+	private static Logger self = new Logger();
+	@Override
+	public boolean isDebugging() {
+		// TODO Auto-generated method stub
+		return super.isDebugging();
+	}
+
+	@Override
+	public void setDebugging(boolean value) {
+		// TODO Auto-generated method stub
+		super.setDebugging(value);
+	}
+
+
+	@Override
+	public void start(BundleContext context) throws Exception {
+		// TODO Auto-generated method stub
+		super.start(context);
+		if(log == null) log = this.getLog();
+		System.out.println(context.getBundle().getSymbolicName() + ": started");
+	}
+
+	@Override
+	public void stop(BundleContext context) throws Exception {
+		// TODO Auto-generated method stub
+		super.stop(context);
+	}
+	
+	public static Logger getInstance() {
+		++ visitied;
+		return self;
+	}
+	
+	public void trace(int level, String pluginId, String msg, Throwable e) {
+		if(log == null) log = this.getLog();
+		log.log(new Status(level, pluginId, msg, e));
+	}
+
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src/main/java/org/apache/geronimo/runtime/common/log/Logger.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src/main/java/org/apache/geronimo/runtime/common/log/Logger.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/src/main/java/org/apache/geronimo/runtime/common/log/Logger.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message