You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jose Alberto Fernandez <JF...@viquity.com> on 2000/11/18 03:27:24 UTC
RE: Why does the echo task output to System.out? (Was: RE: [submi
t] I ntegration of Ant into Visual Age for Java)
> From: Simeon Fitch [mailto:metasim@yahoo.com]
>
>
> --- Jose Alberto Fernandez <JF...@viquity.com> wrote:
> > > From: Simeon Fitch [mailto:metasim@yahoo.com]
>
>
> >
> > what does this means?
> >
> > <echo message="my message" output="myfile" loglevel="info" />
>
> I would interpret it as meaning "send the message 'my message' to the
> output file 'myfile' and also log it to the logger at the log level
> 'info'". Now that you express it that way, I think I like
> being able to do
> both like that. It seems a pretty straight forward way of
> expressing it.
>
By that definition then:
<echo message="my message" output="myfile" />
this will log the message to the logger, eventhough I wanted to write a
file.
This is so, because you are defining echo as having default loglevel
"warn"(sp?)
So the above is equivalent to:
<echo message="my message" output="myfile" loglevel="warn" />
how do I say just write this to the file!!!
> >
> > On the other hand:
> >
> > <log message"my message" loglevel="info" />
> >
> > says log the message at loglevel info, which is not
> depending on anything
> > the message is always sent and it is upto the logger
> infrastructure to
> > decide if the
> > message will be filtered out or not.
>
> How is this any different than just saying
> <echo message"my message" loglevel="info"/>
> i.e. functionally they are synonomous.
>
My point is to separate the behaviours that you are now clupting together!!
> >
> > I can imagine ANT bradcasting to multiple loggers each one
> with its own
> > loglevel. So for example the embedded GUI console do not
> gets all the
> > tracing, but a the debug file will.
>
> I guess I prefer to see the "output" and "loglevel"
> attributes as separate
> handlers for the same <echo> operation. So, if a target had
> the following
> in it:
> <echo message="I'm in the foo target." output="debug.log"
> loglevel="debug"/>
>
> Then this message would definately go to the file
> "debug.log", and show up
> on the GUI console if the filtering level was set to "debug".
>
Every time people clump together to different tasks into one just because
it is easy, I looks to me like a hack. One thing is to log something
a different thing is to write the content of a file as part of the
build. In particular <echo> is used to create property files and so on
why would such file contents go to the log subsystem.
Jose Alberto