org.opencms.file
Class TestLinkRewriter.ExpectErrorLogHandler

java.lang.Object
  extended by org.opencms.file.TestLinkRewriter.ExpectErrorLogHandler
All Implemented Interfaces:
I_CmsLogHandler
Enclosing class:
TestLinkRewriter

public class TestLinkRewriter.ExpectErrorLogHandler
extends Object
implements I_CmsLogHandler

A log handler which detects whether an error message containing a given string is written to the log.


Constructor Summary
TestLinkRewriter.ExpectErrorLogHandler(String text)
          Creates a new instance.
 
Method Summary
 void handleLogEvent(org.apache.log4j.spi.LoggingEvent event)
          This method will be called when log events are triggered.
 boolean isTriggered()
          Returns true if the text has been detected in log messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestLinkRewriter.ExpectErrorLogHandler

public TestLinkRewriter.ExpectErrorLogHandler(String text)
Creates a new instance.

Parameters:
text - the text to detect in log messages
Method Detail

handleLogEvent

public void handleLogEvent(org.apache.log4j.spi.LoggingEvent event)
This method will be called when log events are triggered.

Specified by:
handleLogEvent in interface I_CmsLogHandler
Parameters:
event - the log event

isTriggered

public boolean isTriggered()
Returns true if the text has been detected in log messages.

Returns:
true if the text has been detected in log messages