The System.out.println for that "Buildfile:" line is before the Project
object is created and before the logger and listeners are added, so its not
really the XmlLogger that is doing the writing, its the output stream from
Main that is doing it.. *ugh* - interesting find, Diane.
Most definitely a bug.
Were you using -logfile in conjunction with XmlLogger? I'm guessing yes.
Would you file this as a bug and I'll have a look at it at some point in the
near future. The short answer is: don't use it as a logger at the moment.
:/ Sorry.
Its very likely that in my tests with this that I never verified that the
XML output was "well formed" and simply typed the output to make sure it was
following the verbosity level rules, and I overlooked the "Buildfile:" line.
*arg*. I'm not quite sure what the solution to this is, since the XmlLogger
is writing to a file that has already been written to beyond its control.
Anyway, I'll try to look into this soon. The good news it still works as a
listener :) And to get the output to a file, simply do this:
ant -listener
org.apache.tools.ant.XmlLogger -DXmlLogger.file=log.xml
Erik
----- Original Message -----
From: "Diane Holt" <[EMAIL PROTECTED]>
To: "Ant Users List" <[EMAIL PROTECTED]>
Sent: Monday, June 10, 2002 7:05 PM
Subject: Re: Using XmlLogger as a logger
> Oops, here's the problem -- it's not that the output is completely
> different (once you grep out all those "<message priority...>" lines),
> it's that the "Buildfile build.xml" line gets included in the log.xml
> file.
>
> $ cat log.xml
> Buildfile: build.xml
> <?xml version="1.0" encoding="UTF-8" ?>
> <?xml-stylesheet type="text/xsl" href="log.xsl"?>
>
> [snip]
>
> Once I got rid of that, log.xsl worked on it.
>
> Diane
>
> =====
> ([EMAIL PROTECTED])
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>