I am using MailLogger to send a message about a failed/successful release. I would like to make the mail body simple and easy to read. How can I suppress output for some particular tasks?
+1
A:
Would it be too simple if you'd call nant with the -quiet switch?
EDIT: and for the tasks whose output you are interested in you can set the verbose attribute to true.
Jasper
2008-10-03 13:00:28
Ok. But -quite switch make quite also tasks which I don't want.
Jakub Šturc
2008-10-03 13:02:17
There only seems to be a global off-switch and a per task setting which makes the output more verbose as far as i can see
Jasper
2008-10-03 13:10:39
Ok. This starts to be little more hacking that I would like to. I'll try it but doesn't it also prints additional output for verbose tasks?
Jakub Šturc
2008-10-03 13:12:20
Unfortunately yes
Jasper
2008-10-03 13:13:17
An entirely other approach would be to use the xml logger to ouput an xml file, filter it with xslt and use the mail task to sent the transformed output to your inbox.
Jasper
2008-10-03 13:19:21
Nice :-) Write it as another answer please. I am not going to do that right now. Anyway if nobody comes with better answer I accept this.
Jakub Šturc
2008-10-03 13:24:51
+1
A:
Another option would be to use the xmllogger instead of the maillogger, to output an xml file which can then be processed using a xslt stylesheet. Use the stylesheet to filter out information you don't need. If you want it to be mailed to your inbox you could use the mail task from nant and include the transformed file as an attachment or if you transformed it to txt/html you could also use it to fill the body.
Jasper
2008-10-03 13:31:25