Hi I am writing an installation program using Ant. Currently I am running my program in quiet mode. This way, I can send user information requests [input] to the screen as well as [echo] specific information that I want the user to see. I can also send other debugging and logging information to various log files.
This is all easy. I have written a couple of simple macros, which makes it even easier and gives me more control. I want to know if there is an easy and automatic way to at the same time as the above, send the automatically generated verbose information to a log file, without sending it to the screen. For example a replace task generates some verbose information (and a summary), that I want sent to the log file, but not the screen. I could manually echo some info to the log, e.g. the token and the value for example. I have to problems with this: 1) It is manual, not automatic 2) I don't have access to that internal verbose information, for example the replace summary. [replace] Replaced 6 occurrences in 0 files. I know that you can override the logger. I have looked for a logger that does what I want, but not found anything yet. Can anyone recommend one and some tips or examples of how to get it to do what I want it too? It seems like Log4J could be setup to do this, but it looks a bit complicated. I am also already using AntXtras for things like variables and looping tasks. If you are not using AntXtras, yet, I highly recommend this, it fills a lot of the gaps in Ant and is really easy to use. I see AntXtras has some special support for Log4J, but I have not looked into this yet. Perhaps someone can give me some pointers on how to use AntXtras to do the type of logging that I need. I don't have any Java experience, so I am not in a position to be able to do my own implementation. I would even settle for a script internal task to manually switch between verbose logging to file and quiet logging to the screen, as and when I want to switch. Any help will be much appreciated. Best Regards Dylan