| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectelectric.util.log.Log
Log defines static methods for maintaining a collection of ILoggers and sending an event to all of them. The collection is initialized to a single default logger that logs ERROR and COMMENT events to System.out.
| Constructor Summary | |
Log()
 | 
|
| Method Summary | |
static void | 
addLogger(java.lang.String name,
          ILogger logger)
Add the specified logger to my collection of loggers.  | 
static void | 
disableLogger(java.lang.String name)
Disable the specified logger from my collection of loggers.  | 
static void | 
enableLogger(java.lang.String name)
Reenable the specified logger in my collection of loggers.  | 
static java.util.Enumeration | 
getCategories()
Return all registered logging categories  | 
static java.lang.String | 
getCategory(long code)
Return the category associated with the specified code.  | 
static long | 
getCode(java.lang.String category)
Return the code for the specified category.  | 
static java.util.Hashtable | 
getExplicitLogging()
 | 
static ILogger | 
getLogger(java.lang.String name)
Returns a logger with the specified logger name.  | 
static java.util.Enumeration | 
getLoggerNames()
Return an enumeration over all the current logger names.  | 
static java.util.Enumeration | 
getLoggers()
Return an enumeration over all the current loggers.  | 
static boolean | 
isLogging(long mask)
Return true if at least one of the loggers is logging a category defined by the mask.  | 
static boolean | 
isLogging(java.lang.String category)
Return true if at least one of the loggers is logging the specified category.  | 
static void | 
log(long code,
    java.lang.Object event)
Send event( category, message ) to each logger that is logging the specified category.  | 
static void | 
log(long code,
    java.lang.String message,
    java.lang.Throwable throwable)
 | 
static void | 
log(long code,
    java.lang.Throwable throwable)
 | 
static void | 
log(java.lang.Object event)
Log the event with category "COMMENT".  | 
static void | 
log(java.lang.String category,
    java.lang.Object event)
Send event( category, message ) to each logger that is logging the specified category.  | 
static void | 
log(java.lang.String category,
    java.lang.Throwable throwable)
 | 
static void | 
logComment(java.lang.String message)
 | 
static void | 
logException(java.lang.String message,
             java.lang.Throwable throwable)
Log the event with category "EXCEPTION_EVENT".  | 
static void | 
logException(java.lang.Throwable throwable)
Log the event with category "EXCEPTION_EVENT".  | 
static void | 
logWarning(java.lang.String message)
 | 
static void | 
removeLogger(java.lang.String name)
Remove the specified logger from my collection of loggers.  | 
static void | 
startLogging(long code)
Instruct all loggers to start logging events of the specified category.  | 
static void | 
startLogging(java.lang.String category)
Instruct all loggers to start logging events of the specified category.  | 
static void | 
stopLogging(long code)
 | 
static void | 
stopLogging(java.lang.String category)
Instruct all loggers to stop logging events of the specified category.  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public Log()
| Method Detail | 
public static boolean isLogging(long mask)
mask - The mask.public static boolean isLogging(java.lang.String category)
category - The category.public static long getCode(java.lang.String category)
category - The category.public static java.lang.String getCategory(long code)
code - The code.public static ILogger getLogger(java.lang.String name)
name - The name of the logger
public static void addLogger(java.lang.String name,
                             ILogger logger)
name - The name of the logger.logger - The logger to add.public static void removeLogger(java.lang.String name)
name - The name of the logger.public static void disableLogger(java.lang.String name)
name - The name of the logger.public static void enableLogger(java.lang.String name)
name - The name of the logger.public static java.util.Enumeration getLoggers()
public static java.util.Enumeration getLoggerNames()
public static java.util.Hashtable getExplicitLogging()
public static void startLogging(long code)
code - The code of the category.public static void startLogging(java.lang.String category)
category - The category.public static void stopLogging(long code)
code - public static void stopLogging(java.lang.String category)
category - The category.public static java.util.Enumeration getCategories()
public static void log(java.lang.Object event)
event - The event.
public static void log(java.lang.String category,
                       java.lang.Throwable throwable)
category - throwable - 
public static void log(long code,
                       java.lang.Throwable throwable)
code - throwable - 
public static void log(long code,
                       java.lang.String message,
                       java.lang.Throwable throwable)
code - message - throwable - 
public static void log(java.lang.String category,
                       java.lang.Object event)
category - The category.event - The event to log.
public static void log(long code,
                       java.lang.Object event)
code - The category code.event - The event to log.public static void logException(java.lang.Throwable throwable)
throwable - The exception.
public static void logException(java.lang.String message,
                                java.lang.Throwable throwable)
message - The messagethrowable - The exception.public static void logComment(java.lang.String message)
message - public static void logWarning(java.lang.String message)
message - 
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||