ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tennis Smith <ten...@tripit.com>
Subject Logging Errors From Text Files
Date Mon, 27 Jul 2009 19:47:35 GMT
Hi,

I have some tests that send output to plain text files.  Its easy to spot
errors in the files by simply doing something like:
        <fileset id="error.files"
                 dir="${build.results}"
                 includes="**/*.txt">
            <or>
                <contains text="Fatal error" casesensitive="yes"/>
                <contains text="SQLException" casesensitive="yes"/>
            </or>
        </fileset>

What I cannot figure out, is how to log something that would identify
exactly what the error is, and where it was found.
For example, assuming the string "Fatal error" is found, how can I generate
a message in the log like:
ERROR: Fatal error found in file foo.txt line 20!

Tks,
-T

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message