ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "R Smith" <>
Subject Directly accessing log messages for sending out e-mails manually
Date Thu, 21 Oct 2004 22:03:36 GMT
Hi.  Up to this point, I have been using Ant's built-in functionality to 
send e-mails when there are errors in my build.  That is, I've been starting 
off with the following line in my batch file:

@call ant -logger -buildfile 
build.xml main

Now, however, I have decided to use <trycatch> blocks from Ant-Contrib 
because I need more flexibility.  So far I've gotten the <trycatch> blocks 
to work (yay!), but unfortunately I'm not able to capture the entire log 
message in a property, only the error message.  What I want to know is:

1) Is there a way to access the log message directly so that I can send in 
out using a <mail>task in my <catch> block?  Right now I'm able to send the 
error message only, but I want the entire log message as well.

2) Does the <catch> block automatically negate anything that the MailLogger 
would send out?  In other words, I notice that when my <catch> block gets 
called, the MailLogger never sends out its typical message, which is OK with 
me actually.  I'm just wondering if it's even worth bothering to use the 
MailLogger at all, or if I should just get rid of it since I want to send 
out mail in my <catch> blocks.

Thanks for any help!!


Check out Election 2004 for up-to-date election news, plus voter tools and 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message