1

Is there a chance to make the echoproperties task depend on the log level (something similar to the level parameter in echo task)? It would be helpful to have some echoproperties outputs only when ant runs in debug mode (-debug).

Alternative: how can I detect in Ant the current log level? Is there e a property that contains the log level?

Thx! Frank

Frank Winkler
  • 409
  • 6
  • 16
  • [This post](http://stackoverflow.com/questions/5462732/make-ant-quiet-without-the-q-flag) may help you. Just replace `setMessageOutputLevel` with `getMessageOutputLevel`. – barfuin Apr 05 '13 at 09:02
  • Unfortunately, there is not `getMessageOutputLevel` getter, but just `msgOutputLevel` protected field: http://api.dpml.net/ant/1.7.0/org/apache/tools/ant/DefaultLogger.html – Vadzim Oct 04 '13 at 16:32

1 Answers1

0

Consider using ant record task for this use case.

See How do I capture the output of an antcall inside of ant?.

Community
  • 1
  • 1
Vadzim
  • 24,954
  • 11
  • 143
  • 151