Package org.apache.ant.antunit
Class LogContains
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.ant.antunit.LogContains
-
- All Implemented Interfaces:
java.lang.Cloneable
,org.apache.tools.ant.taskdefs.condition.Condition
public class LogContains extends org.apache.tools.ant.ProjectComponent implements org.apache.tools.ant.taskdefs.condition.Condition
A condition that tests the log output of the current project for a given string.Works in conjunction with
LogCapturer
and needs the context provided by AntUnit.
-
-
Constructor Summary
Constructors Constructor Description LogContains()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
eval()
void
setLevel(org.apache.tools.ant.taskdefs.Echo.EchoLevel echoLevel)
minimal log priority to consult.void
setMergeLines(boolean b)
Whether to merge messages into a single line or split them into multiple lines.void
setText(java.lang.String t)
Test the log shall contain.
-
-
-
Method Detail
-
setText
public void setText(java.lang.String t)
Test the log shall contain.- Parameters:
t
- text to look for
-
setLevel
public void setLevel(org.apache.tools.ant.taskdefs.Echo.EchoLevel echoLevel)
minimal log priority to consult.- Parameters:
echoLevel
- minimal log priority
-
setMergeLines
public void setMergeLines(boolean b)
Whether to merge messages into a single line or split them into multiple lines.- Parameters:
b
- whether to merge messages into a single line- Since:
- AntUnit 1.3
-
eval
public boolean eval()
- Specified by:
eval
in interfaceorg.apache.tools.ant.taskdefs.condition.Condition
-
-