Protege 2.1

edu.stanford.smi.protege.util
Class Log

java.lang.Object
  extended byedu.stanford.smi.protege.util.Log

public class Log
extends Object

A utility class that prints trace messages of various sorts to a log. By default the "log" is the err console but it could be directed elsewhere.

The following code is an example of the use of Log.

 class Foo {
     void bar(Object o) {
         ...
         Log.trace("my message", this, "bar", o);
         ...
     }
     void static baz(Object o1, String s1) {
         ...
         Log.trace("my message", Foo.class, "baz", o1, s1);
         ...
     }
 }
 

Author:
Ray Fergerson

Nested Class Summary
static interface Log.Logger
          Description of the Class
 
Constructor Summary
Log()
           
 
Method Summary
static void enter(Object thisOrClass, String methodName)
          Make an entry into the log with the message that methodName has been called (see the Log class example).
static void enter(Object thisOrClass, String methodName, Object arg1)
          Make an entry into the log with the message that methodName has been called and passed the listed argument (see the Log class example).
static void enter(Object thisOrClass, String methodName, Object arg1, Object arg2)
          Make an entry into the log with the message that methodName has been called and passed the listed arguments (see the Log class example).
static void enter(Object thisOrClass, String methodName, Object arg1, Object arg2, Object arg3)
          Make an entry into the log with the message that methodName has been called and passed the listed arguments (see the Log class example).
static void enter(Object thisOrClass, String methodName, Object arg1, Object arg2, Object arg3, Object arg4)
          Make an entry into the log with the message that methodName has been called and passed the listed arguments (see the Log class example).
static void enter(Object thisOrClass, String methodName, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
          Make an entry into the log with the message that methodName has been called and passed the listed arguments (see the Log class example).
static void error(String description, Object thisOrClass, String methodName)
          Put a message into the log that an error with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).
static void error(String description, Object thisOrClass, String methodName, Object arg1)
          Put a message into the log that an error with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).
static void error(String description, Object thisOrClass, String methodName, Object arg1, Object arg2)
          Put a message into the log that an error with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).
static void error(String description, Object thisOrClass, String methodName, Object arg1, Object arg2, Object arg3)
          Put a message into the log that an error with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).
static void error(String description, Object thisOrClass, String methodName, Object arg1, Object arg2, Object arg3, Object arg4)
          Put a message into the log that an error with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).
static void error(String description, Object thisOrClass, String methodName, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
          Put a message into the log that an error with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).
static void exception(Throwable exception, Object thisOrClass, String methodName)
          Put a message into the log that an unexpected exception was caught from inside of methodName (see the Log class example).
static void exception(Throwable exception, Object thisOrClass, String methodName, Object arg1)
          Put a message into the log that an unexpected exception was caught from inside of methodName which was called with the listed arguments (see the Log class example).
static void exception(Throwable exception, Object thisOrClass, String methodName, Object arg1, Object arg2)
          Put a message into the log that an unexpected exception was caught from inside of methodName which was called with the listed arguments (see the Log class example).
static void exception(Throwable exception, Object thisOrClass, String methodName, Object arg1, Object arg2, Object arg3)
          Put a message into the log that an unexpected exception was caught from inside of methodName which was called with the listed arguments (see the Log class example).
static void exception(Throwable exception, Object thisOrClass, String methodName, Object arg1, Object arg2, Object arg3, Object arg4)
          Put a message into the log that an unexpected exception was caught from inside of methodName which was called with the listed arguments (see the Log class example).
static void exception(Throwable exception, Object thisOrClass, String methodName, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
          Put a message into the log that an unexpected exception was caught from inside of methodName which was called with the listed arguments (see the Log class example).
static void exit(Object thisOrClass, String methodName)
          Make an entry into the log with the message that methodName has returned (see the Log class example).
static int getErrorCount()
           
static int getTraceCount()
           
static int getWarningCount()
           
static void resetCount()
           
static void resetCounts()
           
static void setDisplayTrace(boolean b)
           
static void setDisplayWarnings(boolean b)
           
static void setDoPause(boolean b)
           
static void setLogger(Log.Logger logger)
           
static void setShowStack(boolean b)
           
static void stack(String description, Object thisOrClass, String methodName)
          Put a stack dump and message "description" into the log with the additional information that the message is occuring from inside of methodName (see the Log class example).
static void stack(String description, Object thisOrClass, String methodName, Object arg1)
          Put a stack dump and message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed argument (see the Log class example).
static void stack(String description, Object thisOrClass, String methodName, Object arg1, Object arg2)
          Put a stack dump and message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed arguments (see the Log class example).
static void stack(String description, Object thisOrClass, String methodName, Object arg1, Object arg2, Object arg3)
          Put a stack dump and message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed arguments (see the Log class example).
static void stack(String description, Object thisOrClass, String methodName, Object arg1, Object arg2, Object arg3, Object arg4)
          Put a stack dump and message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed arguments (see the Log class example).
static void trace(String description, Object thisOrClass, String methodName)
          Put a trace message "description" into the log with the additional information that the message is occuring from inside of methodName (see the Log class example).
static void trace(String description, Object thisOrClass, String methodName, Object arg1)
          Put a trace message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed arguments (see the Log class example).
static void trace(String description, Object thisOrClass, String methodName, Object arg1, Object arg2)
          Put a trace message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed arguments (see the Log class example).
static void trace(String description, Object thisOrClass, String methodName, Object arg1, Object arg2, Object arg3)
          Put a trace message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed arguments (see the Log class example).
static void trace(String description, Object thisOrClass, String methodName, Object arg1, Object arg2, Object arg3, Object arg4)
          Put a trace message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed arguments (see the Log class example).
static void trace(String description, Object thisOrClass, String methodName, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
          Put a trace message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed arguments (see the Log class example).
static void warning(String description, Object thisOrClass, String methodName)
          Put a message into the log that a warning with the given description occurred from inside of methodName (see the Log class example).
static void warning(String description, Object thisOrClass, String methodName, Object arg1)
          Put a message into the log that a warning with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).
static void warning(String description, Object thisOrClass, String methodName, Object arg1, Object arg2)
          Put a message into the log that a warning with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).
static void warning(String description, Object thisOrClass, String methodName, Object arg1, Object arg2, Object arg3)
          Put a message into the log that a warning with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).
static void warning(String description, Object thisOrClass, String methodName, Object arg1, Object arg2, Object arg3, Object arg4)
          Put a message into the log that a warning with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log

public Log()
Method Detail

enter

public static void enter(Object thisOrClass,
                         String methodName)
Make an entry into the log with the message that methodName has been called (see the Log class example).

Parameters:
thisOrClass - Description of Parameter
methodName - Description of Parameter

enter

public static void enter(Object thisOrClass,
                         String methodName,
                         Object arg1)
Make an entry into the log with the message that methodName has been called and passed the listed argument (see the Log class example).

Parameters:
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter

enter

public static void enter(Object thisOrClass,
                         String methodName,
                         Object arg1,
                         Object arg2)
Make an entry into the log with the message that methodName has been called and passed the listed arguments (see the Log class example).

Parameters:
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter

enter

public static void enter(Object thisOrClass,
                         String methodName,
                         Object arg1,
                         Object arg2,
                         Object arg3)
Make an entry into the log with the message that methodName has been called and passed the listed arguments (see the Log class example).

Parameters:
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter
arg3 - Description of Parameter

enter

public static void enter(Object thisOrClass,
                         String methodName,
                         Object arg1,
                         Object arg2,
                         Object arg3,
                         Object arg4)
Make an entry into the log with the message that methodName has been called and passed the listed arguments (see the Log class example).

Parameters:
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter
arg3 - Description of Parameter
arg4 - Description of Parameter

enter

public static void enter(Object thisOrClass,
                         String methodName,
                         Object arg1,
                         Object arg2,
                         Object arg3,
                         Object arg4,
                         Object arg5)
Make an entry into the log with the message that methodName has been called and passed the listed arguments (see the Log class example).

Parameters:
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter
arg3 - Description of Parameter
arg4 - Description of Parameter
arg5 - Description of Parameter

error

public static void error(String description,
                         Object thisOrClass,
                         String methodName)
Put a message into the log that an error with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter

error

public static void error(String description,
                         Object thisOrClass,
                         String methodName,
                         Object arg1)
Put a message into the log that an error with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter

error

public static void error(String description,
                         Object thisOrClass,
                         String methodName,
                         Object arg1,
                         Object arg2)
Put a message into the log that an error with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter

error

public static void error(String description,
                         Object thisOrClass,
                         String methodName,
                         Object arg1,
                         Object arg2,
                         Object arg3)
Put a message into the log that an error with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter
arg3 - Description of Parameter

error

public static void error(String description,
                         Object thisOrClass,
                         String methodName,
                         Object arg1,
                         Object arg2,
                         Object arg3,
                         Object arg4)
Put a message into the log that an error with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter
arg3 - Description of Parameter
arg4 - Description of Parameter

error

public static void error(String description,
                         Object thisOrClass,
                         String methodName,
                         Object arg1,
                         Object arg2,
                         Object arg3,
                         Object arg4,
                         Object arg5)
Put a message into the log that an error with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter
arg3 - Description of Parameter
arg4 - Description of Parameter
arg5 - Description of Parameter

exception

public static void exception(Throwable exception,
                             Object thisOrClass,
                             String methodName)
Put a message into the log that an unexpected exception was caught from inside of methodName (see the Log class example).

Parameters:
exception - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter

exception

public static void exception(Throwable exception,
                             Object thisOrClass,
                             String methodName,
                             Object arg1)
Put a message into the log that an unexpected exception was caught from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
exception - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter

exception

public static void exception(Throwable exception,
                             Object thisOrClass,
                             String methodName,
                             Object arg1,
                             Object arg2)
Put a message into the log that an unexpected exception was caught from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
exception - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter

exception

public static void exception(Throwable exception,
                             Object thisOrClass,
                             String methodName,
                             Object arg1,
                             Object arg2,
                             Object arg3)
Put a message into the log that an unexpected exception was caught from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
exception - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter
arg3 - Description of Parameter

exception

public static void exception(Throwable exception,
                             Object thisOrClass,
                             String methodName,
                             Object arg1,
                             Object arg2,
                             Object arg3,
                             Object arg4)
Put a message into the log that an unexpected exception was caught from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
exception - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter
arg3 - Description of Parameter
arg4 - Description of Parameter

exception

public static void exception(Throwable exception,
                             Object thisOrClass,
                             String methodName,
                             Object arg1,
                             Object arg2,
                             Object arg3,
                             Object arg4,
                             Object arg5)
Put a message into the log that an unexpected exception was caught from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
exception - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter
arg3 - Description of Parameter
arg4 - Description of Parameter
arg5 - Description of Parameter

exit

public static void exit(Object thisOrClass,
                        String methodName)
Make an entry into the log with the message that methodName has returned (see the Log class example).

Parameters:
thisOrClass - Description of Parameter
methodName - Description of Parameter

getErrorCount

public static int getErrorCount()

getTraceCount

public static int getTraceCount()

getWarningCount

public static int getWarningCount()

resetCount

public static void resetCount()

resetCounts

public static void resetCounts()

setDisplayTrace

public static void setDisplayTrace(boolean b)

setDisplayWarnings

public static void setDisplayWarnings(boolean b)

setDoPause

public static void setDoPause(boolean b)

setLogger

public static void setLogger(Log.Logger logger)

setShowStack

public static void setShowStack(boolean b)

stack

public static void stack(String description,
                         Object thisOrClass,
                         String methodName)
Put a stack dump and message "description" into the log with the additional information that the message is occuring from inside of methodName (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter

stack

public static void stack(String description,
                         Object thisOrClass,
                         String methodName,
                         Object arg1)
Put a stack dump and message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed argument (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter

stack

public static void stack(String description,
                         Object thisOrClass,
                         String methodName,
                         Object arg1,
                         Object arg2)
Put a stack dump and message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter

stack

public static void stack(String description,
                         Object thisOrClass,
                         String methodName,
                         Object arg1,
                         Object arg2,
                         Object arg3)
Put a stack dump and message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter
arg3 - Description of Parameter

stack

public static void stack(String description,
                         Object thisOrClass,
                         String methodName,
                         Object arg1,
                         Object arg2,
                         Object arg3,
                         Object arg4)
Put a stack dump and message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed arguments (see the Log class example).


trace

public static void trace(String description,
                         Object thisOrClass,
                         String methodName)
Put a trace message "description" into the log with the additional information that the message is occuring from inside of methodName (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter

trace

public static void trace(String description,
                         Object thisOrClass,
                         String methodName,
                         Object arg1)
Put a trace message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter

trace

public static void trace(String description,
                         Object thisOrClass,
                         String methodName,
                         Object arg1,
                         Object arg2)
Put a trace message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter

trace

public static void trace(String description,
                         Object thisOrClass,
                         String methodName,
                         Object arg1,
                         Object arg2,
                         Object arg3)
Put a trace message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter
arg3 - Description of Parameter

trace

public static void trace(String description,
                         Object thisOrClass,
                         String methodName,
                         Object arg1,
                         Object arg2,
                         Object arg3,
                         Object arg4)
Put a trace message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter
arg3 - Description of Parameter
arg4 - Description of Parameter

trace

public static void trace(String description,
                         Object thisOrClass,
                         String methodName,
                         Object arg1,
                         Object arg2,
                         Object arg3,
                         Object arg4,
                         Object arg5)
Put a trace message "description" into the log with the additional information that the message is occuring from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter
arg3 - Description of Parameter
arg4 - Description of Parameter
arg5 - Description of Parameter

warning

public static void warning(String description,
                           Object thisOrClass,
                           String methodName)
Put a message into the log that a warning with the given description occurred from inside of methodName (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter

warning

public static void warning(String description,
                           Object thisOrClass,
                           String methodName,
                           Object arg1)
Put a message into the log that a warning with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter

warning

public static void warning(String description,
                           Object thisOrClass,
                           String methodName,
                           Object arg1,
                           Object arg2)
Put a message into the log that a warning with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter

warning

public static void warning(String description,
                           Object thisOrClass,
                           String methodName,
                           Object arg1,
                           Object arg2,
                           Object arg3)
Put a message into the log that a warning with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter
arg3 - Description of Parameter

warning

public static void warning(String description,
                           Object thisOrClass,
                           String methodName,
                           Object arg1,
                           Object arg2,
                           Object arg3,
                           Object arg4)
Put a message into the log that a warning with the given description occurred from inside of methodName which was called with the listed arguments (see the Log class example).

Parameters:
description - Description of Parameter
thisOrClass - Description of Parameter
methodName - Description of Parameter
arg1 - Description of Parameter
arg2 - Description of Parameter
arg3 - Description of Parameter
arg4 - Description of Parameter

Protege 2.1

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2004 Stanford University.