ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@antbuild.com>
Subject Re: environment variable
Date Wed, 30 Jul 2003 14:16:14 GMT
> If, say in build.properties:
>
> # Build run-time behaviour
> current.run.mode=-quiet
>
> and then in build.xml:
>
> <property environment="env"/>
> <property file="build.properties"/>
> <property name="env.ANT_ARGS" value="${current.run.mode}"/>
> <echo> ANT_ARGS is: ${env.ANT_ARGS}</echo>
>
env.ANT_ARGS is just a "dead" copy of the environment variable ANT_ARGS.
Properties are immutable, so you cannot change env.ANT_ARGS once set.
Even if you could, it would not change the logging level of your build.

When you start ant from the command line, the logging level is set by the
command line.
The default is INFO. Otherwise you can have it verbose or debug
with -verbose or -debug.

With the API you might have more flexibility.

Otherwise the <record/> task allows to record logs inside a build into
files, and the logging level is written as an attribute of the task in the
build file.

Cheers,

Antoine



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message