geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcco...@apache.org
Subject svn commit: r588505 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/internal/Trace.java
Date Fri, 26 Oct 2007 04:06:04 GMT
Author: mcconne
Date: Thu Oct 25 21:06:03 2007
New Revision: 588505

URL: http://svn.apache.org/viewvc?rev=588505&view=rev
Log:
Enhance trace capabilities

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/internal/Trace.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/internal/Trace.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/internal/Trace.java?rev=588505&r1=588504&r2=588505&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/internal/Trace.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/internal/Trace.java
Thu Oct 25 21:06:03 2007
@@ -25,56 +25,100 @@
  */
 public class Trace {
 
-	/**
-	 * Finest trace event.
-	 */
-	public static byte INFO = 0;
-
-	/**
-	 * Warning trace event.
-	 */
-	public static byte WARNING = 1;
-
-	/**
-	 * Severe trace event.
-	 */
-	public static byte SEVERE = 2;
-
-	/**
-	 * Trace constructor comment.
-	 */
-	private Trace() {
-		super();
-	}
-
-	/**
-	 * Trace the given text.
-	 * 
-	 * @param level
-	 *            the trace level
-	 * @param s
-	 *            a message
-	 */
-	public static void trace(byte level, String s) {
-		trace(level, s, null);
-	}
-
-	/**
-	 * Trace the given message and exception.
-	 * 
-	 * @param level
-	 *            the trace level
-	 * @param s
-	 *            a message
-	 * @param t
-	 *            a throwable
-	 */
-	public static void trace(byte level, String s, Throwable t) {
-		if (!Activator.getDefault().isDebugging())
-			return;
-
-		System.out.println(Activator.PLUGIN_ID + ":  " + s);
-		if (t != null)
-			t.printStackTrace();
-	}
+    /**
+     * Finest trace event.
+     */
+    public static byte INFO = 0;
+
+    /**
+     * Warning trace event.
+     */
+    public static byte WARNING = 1;
+
+    /**
+     * Severe trace event.
+     */
+    public static byte SEVERE = 2;
+
+    /**
+     * Trace constructor comment.
+     */
+    private Trace() {
+        super();
+    }
+
+    /**
+     * Trace the given text.
+     * 
+     * @param level
+     *            the trace level
+     * @param s
+     *            a message
+     */
+    public static void trace(byte level, String s) {
+        trace(level, s, null);
+    }
+
+    /**
+     * Trace the given message and exception.
+     * 
+     * @param level
+     *            the trace level
+     * @param s
+     *            a message
+     * @param t
+     *            a throwable
+     */
+    public static void trace(byte level, String s, Throwable t) {
+        if (!Activator.getDefault().isDebugging())
+            return;
+
+        System.out.println(Activator.PLUGIN_ID + ":  " + s);
+        if (t != null)
+            t.printStackTrace();
+    }
+
+    /**
+     * Trace the given message 
+     * 
+     * @param tracePoint
+     *            The trace point (e.g., "Exit", "Entry", "Constructor", etc....
+     *            
+     * @param classDotMethod
+     *            The class name + method name (e.g., "Class.method()")
+     *            
+     * @param parm1,2,3,4,5
+         *            Method parameters if the trace point is an "Entry"
+         *            or
+         *            Return value if the trace point is an "Exit"
+     */
+    public static void trace(String tracePoint, String classDotMethod) {
+        trace(Trace.INFO, tracePoint + ": " + classDotMethod + "()" );
+    }   
+    public static void trace(String tracePoint, String classDotMethod, Object parm1) {
+        trace(Trace.INFO, tracePoint + ": " + classDotMethod + "( parm1=[" + (parm1 == null
? null : parm1.toString()) + "] )" );
+    }
+
+    public static void trace(String tracePoint, String classDotMethod, Object parm1, Object
parm2) {
+        trace(Trace.INFO, tracePoint + ": " + classDotMethod + "( parm1=[" + (parm1 == null
? null : parm1.toString()) + "], " +
+                                                                 "parm2=[" + (parm2 == null
? null : parm2.toString()) + "] )" );
+    }
+    public static void trace(String tracePoint, String classDotMethod, Object parm1, Object
parm2, Object parm3) {
+        trace(Trace.INFO, tracePoint + ": " + classDotMethod + "( parm1=[" + (parm1 == null
? null : parm1.toString()) + "], " +
+                                                                 "parm2=[" + (parm2 == null
? null : parm2.toString()) + "], " +
+                                                                 "parm3=[" + (parm3 == null
? null : parm3.toString()) + "] )" );
+    }
+    public static void trace(String tracePoint, String classDotMethod, Object parm1, Object
parm2, Object parm3, Object parm4) {
+        trace(Trace.INFO, tracePoint + ": " + classDotMethod + "( parm1=[" + (parm1 == null
? null : parm1.toString()) + "], " +
+                                                                 "parm2=[" + (parm2 == null
? null : parm2.toString()) + "], " +
+                                                                 "parm3=[" + (parm3 == null
? null : parm3.toString()) + "], " +
+                                                                 "parm4=[" + (parm4 == null
? null : parm4.toString()) + "] )" );
+    }
+    public static void trace(String tracePoint, String classDotMethod, Object parm1, Object
parm2, Object parm3, Object parm4, Object parm5) {
+        trace(Trace.INFO, tracePoint + ": " + classDotMethod + "( parm1=[" + (parm1 == null
? null : parm1.toString()) + "], " +
+                                                                 "parm2=[" + (parm2 == null
? null : parm2.toString()) + "], " +
+                                                                 "parm3=[" + (parm3 == null
? null : parm3.toString()) + "], " +
+                                                                 "parm4=[" + (parm4 == null
? null : parm4.toString()) + "], " +
+                                                                 "parm5=[" + (parm5 == null
? null : parm5.toString()) + "] )" );
+    }
 }



Mime
View raw message