tags:

views:

323

answers:

2

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
Ok. But -quite switch make quite also tasks which I don't want.
Jakub Šturc
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
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
Unfortunately yes
Jasper
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
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
+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