<typedef name="echofilter"
classname="net.sf.antcount.filters.EchoFilter"
classpath="antcount.jar" />
Using inline definition with filterreader:
<filterreader classname="net.sf.antcount.filters.EchoFilter"
classpath="antcount.jar" />
| Name | Description | Required | Default |
|---|---|---|---|
| contains | If this is set, the input will be echoed only if it contains the specified string. | No | All input is echoed |
| match | If this is set, the input will be echoed only if it matches this regular expression. | No | All input is echoed |
| file | The file to print to. | No | Output on the console |
| append | When writing to a existing file, should we append to it? | No | False |
| encoding | The encoding to use when printing in a file | No | Default system encoding |
Print all lines containing 'xxx' in x.log and all lines containing 'yyy' in y.log
<concat destfile="y.log">
<fileset dir="${log.dir}" includes="**/*.log" />
<filterchain>
<echofilter contains="xxx" file="x.log" />
<linecontains>
<contains value="yyy" />
</linecontains>
</filterchain>
</concat>