[Anthill] AntHill log files
Eric Minick
eric at urbancode.com
Thu Sep 9 16:31:01 CDT 2004
Michael and Ted,
I took another look at this and it might not be as hard as I thought. If
you open up your resultsEmail.pgl file, you'll find a section like this:
String buildLogFileName = properties.getBuildLogDir()
+ _buildDef.getName() + "-"
+ newVersion + "-build.log";
File buildLog = new File(buildLogFileName);
String buildLogString = "";
if (buildLog.exists() && buildLog.length() <= Integer.MAX_VALUE) {
FileInputStream fis = new FileInputStream(buildLog);
int buffersize = (int)buildLog.length();
byte[] contents = new byte[buffersize];;
long n = fis.read(contents, 0, buffersize);
fis.close();
fis = null;
buildLogString = new String(contents);
}
String body = logMessage.toString() +
"\n-------------------------------------\n"
+ buildLogFileName +
buildLogString;
So here we look for the file /logDir/project-1.2.3-build.log, read the
file file into a string and append that string to the body of the
message. If you change this so that it's looking for ...-publish.log
instead, you'll be set. There's some renaming of local variables that
needs to be done, but I think the new section to add is going to look a
lot like:
String publishLogFileName = properties.getBuildLogDir()
+ _buildDef.getName() + "-"
+ newVersion + "-publish.log";
File publishLog = new File(publishLogFileName);
String publishLogString = "";
if (publishLog.exists() && publishLog.length() <= Integer.MAX_VALUE) {
FileInputStream fis = new FileInputStream(publishLog);
int buffersize = (int)publishLog.length();
byte[] contents = new byte[buffersize];;
long n = fis.read(contents, 0, buffersize);
fis.close();
fis = null;
publishLogString = new String(contents);
}
String body = logMessage.toString() +
"\n-------------------------------------\n"
+ publishLogFileName +
publishLogString;
Hope that gets you guys started.
Cheers,
Eric
Ted M. Young wrote:
> This question has been asked a lot, and I could also use this
> information. Surely someone out there is doing this? Anyone know how
> to modify the emails that Anthill sends out? There's really no
> documentation on this and a solution would surely help a lot of folks.
>
> ;ted
>
> ----- Original Message -----
> |Hi,
>
> I have setup anthill and after each build I get a email with the log of
> the build. I also executed my unit test cases. Is there any way I can add
> the results of the unit test cases into the build log that is emailed.
> Please let me know.
>
> Thanks,
> Sri
> _______________________________________________
> Anthill mailing list
> Anthill at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill|
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Anthill mailing list
>Anthill at lists.urbancode.com
>http://lists.urbancode.com/mailman/listinfo/anthill
>
>
More information about the Anthill
mailing list