Martin Aliger wrote:

Ah, you want to suppress standard logging too... Hmm - there is not an
attribute to do that. <exec> task always log all standard output as Info
level messages, and standard error as Warning level messages.

NAnt always write all messages up to level Info when run normally, up to
level Verbose when with -v switch or just to Warning level when in quiet
mode. AFAIK there is no other mean of control over this in standard
distribution (I propose some patches to this, but they wasn't accepted yet).


Gert, Ian, others - what you think about more control over verbosity? It'd
be nice sometimes. Even that I do not have problem with it any longer (since
I switch to xmllogger+xslt templates), Pradeep and propably others would
welcome it. Maybe publishing Threshold Task property could be enough, enable
lowering threshold for specific tasks.

<exec program="nant.exe" commandline="..." output="log.txt"
threshold="Error"/>

Why make this so complicated? If the user specified output= to the <exec> task, then the output goes there and nowhere else, period. If the user wants that in the log as well, then they can still do that using <loadfile> and <echo> (though enhancing <echo> to take the message from a file isn't a bad idea). But if the user has made the decision to direct the output somewhere else, there must be a reason, most often because it's either irrelevant to the build process or too verbose. In the first case, it should be totally suppressed from the NAnt log, and in the second case, it's far more likely the user will want a filter on it. In that case, the loadfile/echo, along with a new grep filter, solve the problem with much more flexibility, and without hobbling the most common usage scenario for the output attribute.

Are there any common usage scenarios for needing the entire output in both places? I can't think of any.

Gary

Martin


_____ From: chellu pradeep [mailto:[EMAIL PROTECTED] Sent: Sunday, December 11, 2005 4:26 PM
To: Martin Aliger
Subject: RE: [nant-dev] writing the NAnt output to a log file ??


even after i use <exec> task's output attribute i can see the result on the
command prompt screen as well as the output gets logged onto a log file. Am
i missing something here?

NOTE: I am using NAnt 0.85 rc3 and NantContrib 0.85 rc3

--Pradeep

Martin Aliger <[EMAIL PROTECTED]> wrote:
          <exec program="..\nant\bin\nant.exe"
commandline="-buildfile:MiddleTier\MTM.MiddleTier.build build >
..\..\..\Log\MTM.MiddleTier.build.log" />

This will never work. ">" sign is shell (cmd.exe) special handling, its not
common to process running. NAnt's <exec> task have special attribute for
file-redirection. See
http://nant.sourceforge.net/nightly/latest/help/tasks/exec.html expecially
output and append attributes.

Martin




_____
Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo!
<http://us.rd.yahoo.com/mail_us/footer/shopping/*http://shopping.yahoo.com/;
_ylc=X3oDMTE2bzVzaHJtBF9TAzk1OTQ5NjM2BHNlYwNtYWlsdGFnBHNsawNob2xpZGF5LTA1>
Shopping



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers






-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to