Name
record
Synopsis
Creates a listener to the current build process, recording output to a file. Multiple recorders can exist for the same file.
Attributes
-
action
(1.4, Enum, N) Defines whether the recorder should start or stop recording. Legal values are
start
andstop
. Defaults tostart
when this task is first encountered. On subsequent calls, the recorder state remains unchanged.-
append
(1.4, boolean, N) If
true
, append to the file when this recorder is first created, rather than replacing the file. Defaults totrue
. Subsequent calls during the same build always append to the file.-
loglevel
(1.4, Enum, N) Determines the logging level. Legal values are
error
,warn
,info
,verbose
, anddebug
. The level may be changed with each recorder instance.-
name
(1.4, String, Y) The name of the file to log to.
Content
None.
Example Usage
This example shows how to write detailed logging information to a file while code compiles.
<record name="javac.log" loglevel="debug"
action="start" append="false"/>
<javac srcdir="${srcdir}" destdir="${builddir}" includes="com/oreilly/antbook/**"> </javac><record name="javac.log" action="stop"/>
Get Ant: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.