Public Member Functions | Static Public Member Functions | Protected Member Functions

alma.acs.testsupport.LogRecordCollectingLogger Class Reference

Inherits java::util::logging::Logger.

List of all members.

Public Member Functions

void log (LogRecord record)
LogRecord[] getCollectedLogRecords ()
void clearLogRecords ()
void suppressLogs (boolean suppressLogs)
void setDelegateLogger (Logger delegate)

Static Public Member Functions

static synchronized
LogRecordCollectingLogger 
getCollectingLogger (String name)
static synchronized< T extends
LogRecordCollectingLogger > T 
getCollectingLogger (String name, Class< T > loggerClass)

Protected Member Functions

 LogRecordCollectingLogger (String name, String resourceBundleName)

Detailed Description

Creates a Logger that collects all LogRecords produced by calls to the various log methods. This can be used to verify log messages in a pure JUnit environment, without the need to use TAT reference files.

Author:
hsommer created Apr 20, 2005 2:30:47 PM

Constructor & Destructor Documentation

alma.acs.testsupport.LogRecordCollectingLogger.LogRecordCollectingLogger ( String  name,
String  resourceBundleName 
) [protected]

Member Function Documentation

void alma.acs.testsupport.LogRecordCollectingLogger.clearLogRecords (  ) 
LogRecord [] alma.acs.testsupport.LogRecordCollectingLogger.getCollectedLogRecords (  ) 
static synchronized<T extends LogRecordCollectingLogger> T alma.acs.testsupport.LogRecordCollectingLogger.getCollectingLogger ( String  name,
Class< T loggerClass 
) [static]
static synchronized LogRecordCollectingLogger alma.acs.testsupport.LogRecordCollectingLogger.getCollectingLogger ( String  name  )  [static]
See also:
java.util.logging.Logger.getLogger(java.lang.String)
void alma.acs.testsupport.LogRecordCollectingLogger.log ( LogRecord  record  ) 

Here we intercept all logging activities of the base class.

See also:
java.util.logging.Logger.log(java.util.logging.LogRecord)
void alma.acs.testsupport.LogRecordCollectingLogger.setDelegateLogger ( Logger  delegate  ) 
Parameters:
delegate a logger to receive log output from this logger, or null to not log any output, but only store the log records.
See also:
suppressLogs(boolean)
void alma.acs.testsupport.LogRecordCollectingLogger.suppressLogs ( boolean  suppressLogs  ) 

Switches real logging off/on. Logging will only happen if a real logger has been provided.

Parameters:
suppressLogs true if collected LogRecords should not be sent to a real logger
See also:
setDelegateLogger(Logger)

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties