com.ashridgetech.gen2j.util
Class Trace

java.lang.Object
  |
  +--com.ashridgetech.gen2j.util.Trace

public class Trace
extends Object

Utility class for assisting method-trace logging with Log4J. Creates DEBUG priority log requests for events such as entering or returning from methods

Version:
1.0
Author:
Paul Boocock

Field Summary
static String LOG4J_PROPERTIES_FILE
           
 
Method Summary
static void enter(org.apache.log4j.Category cat, Object thisObject, String methodName)
          Log entry to an instance method with no parameters.
static void enter(org.apache.log4j.Category cat, Object thisObject, String methodName, Object arg1)
          Log entry to an instance method with one parameter.
static void enter(org.apache.log4j.Category cat, Object thisObject, String methodName, Object arg1, Object arg2)
          Log entry to an instance method with two parameters.
static void enter(org.apache.log4j.Category cat, Object thisObject, String methodName, Object arg1, Object arg2, Object arg3)
          Log entry to an instance method with three parameters.
static void enter(org.apache.log4j.Category cat, Object thisObject, String methodName, Object arg1, Object arg2, Object arg3, Object arg4)
          Log entry to an instance method with four parameters.
static void enter(org.apache.log4j.Category cat, Object thisObject, String methodName, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
          Log entry to an instance method with five parameters.
static void enter(org.apache.log4j.Category cat, String methodName)
          Log entry to a static method with no parameters.
static void enter(org.apache.log4j.Category cat, String methodName, Object arg1)
          Log entry to a static method with one parameter.
static void enter(org.apache.log4j.Category cat, String methodName, Object arg1, Object arg2)
          Log entry to a static method with two parameters.
static void enter(org.apache.log4j.Category cat, String methodName, Object arg1, Object arg2, Object arg3)
          Log entry to a static method with three parameters.
static void enter(org.apache.log4j.Category cat, String methodName, Object arg1, Object arg2, Object arg3, Object arg4)
          Log entry to a static method with four parameters.
static void enter(org.apache.log4j.Category cat, String methodName, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
          Log entry to a static method with five parameters.
static void init()
           
static Object leave(org.apache.log4j.Category cat, Object thisObject, String methodName, Object returnValue)
          Log return value from an instance method.
static String leave(org.apache.log4j.Category cat, Object thisObject, String methodName, String returnValue)
          Log return value from an instance method which returns a String.
static Object leave(org.apache.log4j.Category cat, String methodName, Object returnValue)
          Log return value from an static method.
static String leave(org.apache.log4j.Category cat, String methodName, String returnValue)
          Log return value from an static method which returns a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG4J_PROPERTIES_FILE

public static String LOG4J_PROPERTIES_FILE
Method Detail

init

public static void init()

enter

public static void enter(org.apache.log4j.Category cat,
                         Object thisObject,
                         String methodName)
Log entry to an instance method with no parameters.
Parameters:
cat - the Log4J Category to which the log request is sent
thisObject - the Object instance on which the method is being called
methodName - the name of the method being called

enter

public static void enter(org.apache.log4j.Category cat,
                         Object thisObject,
                         String methodName,
                         Object arg1)
Log entry to an instance method with one parameter.
Parameters:
cat - the Log4J Category to which the log request is sent
thisObject - the Object instance on which the method is being called
methodName - the name of the method being called
arg1 - the first argument of the method being called

enter

public static void enter(org.apache.log4j.Category cat,
                         Object thisObject,
                         String methodName,
                         Object arg1,
                         Object arg2)
Log entry to an instance method with two parameters.
Parameters:
cat - the Log4J Category to which the log request is sent
thisObject - the Object instance on which the method is being called
methodName - the name of the method being called
arg1 - the first argument of the method being called
arg2 - the second argument of the method being called

enter

public static void enter(org.apache.log4j.Category cat,
                         Object thisObject,
                         String methodName,
                         Object arg1,
                         Object arg2,
                         Object arg3)
Log entry to an instance method with three parameters.
Parameters:
cat - the Log4J Category to which the log request is sent
thisObject - the Object instance on which the method is being called
methodName - the name of the method being called
arg1 - the first argument of the method being called
arg2 - the second argument of the method being called
arg3 - the third argument of the method being called

enter

public static void enter(org.apache.log4j.Category cat,
                         Object thisObject,
                         String methodName,
                         Object arg1,
                         Object arg2,
                         Object arg3,
                         Object arg4)
Log entry to an instance method with four parameters.
Parameters:
cat - the Log4J Category to which the log request is sent
thisObject - the Object instance on which the method is being called
methodName - the name of the method being called
arg1 - the first argument of the method being called
arg2 - the second argument of the method being called
arg3 - the third argument of the method being called
arg4 - the fourth argument of the method being called

enter

public static void enter(org.apache.log4j.Category cat,
                         Object thisObject,
                         String methodName,
                         Object arg1,
                         Object arg2,
                         Object arg3,
                         Object arg4,
                         Object arg5)
Log entry to an instance method with five parameters.
Parameters:
cat - the Log4J Category to which the log request is sent
thisObject - the Object instance on which the method is being called
methodName - the name of the method being called
arg1 - the first argument of the method being called
arg2 - the second argument of the method being called
arg3 - the third argument of the method being called
arg4 - the fourth argument of the method being called
arg5 - the fifth argument of the method being called

enter

public static void enter(org.apache.log4j.Category cat,
                         String methodName)
Log entry to a static method with no parameters.
Parameters:
cat - the Log4J Category to which the log request is sent
methodName - the name of the method being called

enter

public static void enter(org.apache.log4j.Category cat,
                         String methodName,
                         Object arg1)
Log entry to a static method with one parameter.
Parameters:
cat - the Log4J Category to which the log request is sent
methodName - the name of the method being called
arg1 - the first argument of the method being called

enter

public static void enter(org.apache.log4j.Category cat,
                         String methodName,
                         Object arg1,
                         Object arg2)
Log entry to a static method with two parameters.
Parameters:
cat - the Log4J Category to which the log request is sent
methodName - the name of the method being called
arg1 - the first argument of the method being called
arg2 - the second argument of the method being called

enter

public static void enter(org.apache.log4j.Category cat,
                         String methodName,
                         Object arg1,
                         Object arg2,
                         Object arg3)
Log entry to a static method with three parameters.
Parameters:
cat - the Log4J Category to which the log request is sent
methodName - the name of the method being called
arg1 - the first argument of the method being called
arg2 - the second argument of the method being called
arg3 - the third argument of the method being called

enter

public static void enter(org.apache.log4j.Category cat,
                         String methodName,
                         Object arg1,
                         Object arg2,
                         Object arg3,
                         Object arg4)
Log entry to a static method with four parameters.
Parameters:
cat - the Log4J Category to which the log request is sent
methodName - the name of the method being called
arg1 - the first argument of the method being called
arg2 - the second argument of the method being called
arg3 - the third argument of the method being called
arg4 - the fourth argument of the method being called

enter

public static void enter(org.apache.log4j.Category cat,
                         String methodName,
                         Object arg1,
                         Object arg2,
                         Object arg3,
                         Object arg4,
                         Object arg5)
Log entry to a static method with five parameters.
Parameters:
cat - the Log4J Category to which the log request is sent
methodName - the name of the method being called
arg1 - the first argument of the method being called
arg2 - the second argument of the method being called
arg3 - the third argument of the method being called
arg4 - the fourth argument of the method being called
arg5 - the fifth argument of the method being called

leave

public static Object leave(org.apache.log4j.Category cat,
                           Object thisObject,
                           String methodName,
                           Object returnValue)
Log return value from an instance method.
Parameters:
cat - the Log4J Category to which the log request is sent
thisObject - the Object instance on which the method is being called
methodName - the name of the method being called
returnValue - the Object being returned by the method
Returns:
the returnValue instance

leave

public static String leave(org.apache.log4j.Category cat,
                           Object thisObject,
                           String methodName,
                           String returnValue)
Log return value from an instance method which returns a String.
Parameters:
cat - the Log4J Category to which the log request is sent
thisObject - the Object instance on which the method is being called
methodName - the name of the method being called
returnValue - the String being returned by the method
Returns:
the returnValue instance

leave

public static Object leave(org.apache.log4j.Category cat,
                           String methodName,
                           Object returnValue)
Log return value from an static method.
Parameters:
cat - the Log4J Category to which the log request is sent
methodName - the name of the method being called
returnValue - the Object being returned by the method
Returns:
the returnValue instance

leave

public static String leave(org.apache.log4j.Category cat,
                           String methodName,
                           String returnValue)
Log return value from an static method which returns a String.
Parameters:
cat - the Log4J Category to which the log request is sent
methodName - the name of the method being called
returnValue - the String being returned by the method
Returns:
the returnValue instance


Copyright © 2002 Ashridge Technologies Ltd. All Rights Reserved.