I'd think it would be best to group all types of failures under 1 'failure' tag. I see what you're saying about internal and build errors having different structures though, maybe we could actually put your second idea into a failure tag, e.g.
<failure> <builderror> ... </> </>
or
<failure> <internalerror> ... </> </>
On a much less important note, this feels better to me to since its feasible (maybe?) that later we could get multiple failures? (e.g. for parallel builds, should that ever happen) Then we could group all failures into one <failures /> tag.
I know this is verbose, but then there is strictly 1 tag type that identifies that there's been a problem (I'm thinking that would make parsing the xml log slightly easier).
Apart from that though, everything else looks great.
Cheers,
Mike
Gert Driesen wrote:
Mike,
I've modified the XmlLogger locally, to use the following xml layout to report build failures :
for build exceptions :
<failure type="build"> <message></message>
<location> <filename></filename> <linenumber></linenumber> <columnnumber></columnnumber> </location>
(if location information is available)
<stacktrace></stacktrace> <failure type="build|internal"> nested exception </failure> </failure>
for internal errors :
<failure type="internal"> <message></message> <stacktrace></stacktrace> <failure type="build|internal"> nested exception </failure> </failure>
However, I'm still not sure I like it all that much
eg. should we use elements named <builderror> and <internalerror> instead of using failure type="build|internal" ? Could be better as an internal error will never have a location node ...
In that case i'd add a type element containing the full name of the type of the exception that was thrown ...
eg.
<builderror> <type>NAnt.Core.BuildException</type> <message><![CDATA[Unable to copy file xxx.]]></message> <location> <filename>D:\CVS\nant\test-xmllogger.xml</filename> <linenumber>15</linenumber> <columnnumber>3</columnnumber> </location> <stacktrace> <![CDATA[ at NAnt.Core.Tasks.FailTask.ExecuteTask() in D:\CVS\nant\src\NAnt.Core\Tasks\FailTask.cs:line 138 at NAnt.Core.Task.Execute() in D:\CVS\nant\src\NAnt.Core\Task.cs:line 151 at NAnt.Core.Target.Execute() in D:\CVS\nant\src\NAnt.Core\Target.cs:line 217 at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies) in D:\CVS\nant\src\NAnt.Core\Project.cs:line 768 at NAnt.Core.Project.Execute() in D:\CVS\nant\src\NAnt.Core\Project.cs:line 730 at NAnt.Core.Project.Run() in D:\CVS\nant\src\NAnt.Core\Project.cs:line 793 ]]> </stacktrace> <builderror>
and
<internalerror> <type>System.ArgumentNullException</type> <message><![CDATA[Argument xx was null.]]></message> <stacktrace> <![CDATA[ at NAnt.Core.Tasks.FailTask.ExecuteTask() in D:\CVS\nant\src\NAnt.Core\Tasks\FailTask.cs:line 138 at NAnt.Core.Task.Execute() in D:\CVS\nant\src\NAnt.Core\Task.cs:line 151 at NAnt.Core.Target.Execute() in D:\CVS\nant\src\NAnt.Core\Target.cs:line 217 at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies) in D:\CVS\nant\src\NAnt.Core\Project.cs:line 768 at NAnt.Core.Project.Execute() in D:\CVS\nant\src\NAnt.Core\Project.cs:line 730 at NAnt.Core.Project.Run() in D:\CVS\nant\src\NAnt.Core\Project.cs:line 793 ]]> </stacktrace> <internalerror>
What do you think ?
Gert
-- Mike Roberts http://mikeroberts.thoughtworks.net/
------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users