com.nexwerk.log4junit.log4j
Interface JUnitAppender

All Superinterfaces:
org.apache.log4j.Appender
All Known Implementing Classes:
DefaultJUnitAppender, MultipleVMJUnitAppender

public interface JUnitAppender
extends org.apache.log4j.Appender

The JUnitAppender will record the messages sent to a standard Log4J LoggingEvent, so that these can be recorded and asserted at a later stage.

Author:
Enrique Comba Riepenhausen Date: Nov 3, 2007 Time: 10:14:56 AM

Method Summary
 java.lang.String getLogMessages()
          Returns the log messages collected so far.
 boolean logLevelReached()
          Checks if the threshold has been reached.
 void setLogLevelThreshold(org.apache.log4j.Level level)
          Sets the threshold level to check against to see if an error has occured.
 void startRecording()
          Start the log recording process.
 void stopRecording()
          Stop the recording process to be able to start asserting the log without the log being cluttered with more logging information.
 
Methods inherited from interface org.apache.log4j.Appender
addFilter, clearFilters, close, doAppend, getErrorHandler, getFilter, getLayout, getName, requiresLayout, setErrorHandler, setLayout, setName
 

Method Detail

startRecording

void startRecording()
Start the log recording process.


stopRecording

void stopRecording()
Stop the recording process to be able to start asserting the log without the log being cluttered with more logging information.


getLogMessages

java.lang.String getLogMessages()
Returns the log messages collected so far.

Returns:
The log messages.

setLogLevelThreshold

void setLogLevelThreshold(org.apache.log4j.Level level)
Sets the threshold level to check against to see if an error has occured.

Parameters:
level - The level threshold

logLevelReached

boolean logLevelReached()
Checks if the threshold has been reached.

Returns:
True if the threshold has been reached.


Copyright © 2007 NexWerk. All Rights Reserved.