Logging utilities, modeled on java.util.logging.AdfLogger; The levels in descending order are:
AdfLogger.SEVERE
(highest value)
AdfLogger.WARNING
AdfLogger.INFO
AdfLogger.CONFIG
AdfLogger.FINE
AdfLogger.FINER
AdfLogger.FINEST
(lowest value)
In addition there is a level
AdfLogger.OFF
that can be used to turn off logging, and a level
AdfLogger.ALL
that can be used to enable logging of all messages. Note that if you call logMessages, etc OFF will really log the message (not ALL).
setFilter(filterFunction)
can be used for finer-grained filtering of the log records to publish. The filter function is called with the log record to log and returns true if the log record should be published.
Method Summary
|
protected Object |
AddLogRecord(Object logRecord)
-
Called by subclasses to add a AdfLogRecord to the AdfLogger
|
private Object |
_calcMsg(Object varArgs)
-
Calculate the message to use when logging
|
public Object |
getFilter()
-
Returns the current filter
|
public Object |
getLevel()
-
Returns the level at which this AdfLogger will log messages
|
public static AdfLogger |
getLogger(String loggerName)
-
Returns the named logger, if any.
|
public Object |
getLogWriter()
-
Returns the AdfLogWriter that this AdfLogger instance is publishing to
|
public String |
getName()
-
Returns the name of this logger
|
protected Object |
Init(Object loggerName, Object logWriter, Object level)
-
Initializes the AdfLogger instance
|
protected static Object |
InitClass()
-
Initializes the AdfLogger class
|
public Object |
isLoggable(Object level)
-
Returns true if messages with the specified level will be logged
|
public Object |
log(Object logRecord)
-
Convenience method for logging a single AdfLogRecord
|
public Object |
logElapsedTime(Object startTime, Object message, Object level)
-
Convenience method for logging timing information
|
public Object |
logError(Object error, Object level, Object message)
-
Convenience method for logging an error
|
public Object |
logErrorAsInfo(Object error, Object message)
-
Convenience method for logging an error at the AdfLogger.INFO severity.
|
public Object |
logErrorAsSevere(Object error, Object message)
-
Convenience method for logging an error at the AdfLogger.SEVERE severity.
|
public Object |
logErrorAsWarning(Object error, Object message)
-
Convenience method for logging an error at the AdfLogger.WARNING severity.
|
public Object |
logMessage(Object level, Object messages)
-
Convenience method for logging a message
|
public Object |
logRecords(Object logRecords)
-
Convenience method for logging an array of AdfLogRecords
|
public AdfLogger |
register()
-
Registers the specified logger, copying over any log messages if possible and closing the logger if a logger with that name already exists
|
protected static Object |
RegisterLevels(Object ourClass, Object levelArr)
-
Creates the AdfLogger convenience methods and accessors
|
public Object |
setFilter(Object newFilter)
-
Changes the logging filter to the new filter.
|
public Object |
setLevel(Object level)
-
Sets the level at which this AdfLogger will log messages
|
public Object |
toDebugString()
-
Override to ditch "Object" and add in the log name and level
|