You might success with:

<loglevel level="None">

 <do>

   <!-- do your secret thing here -->

 </do>

</loglevel>

[TaskName("loglevel")]

public class LogLevelTask : Task

{

   private Level _LogLevel;

   private TaskContainer _Tasks;



   [BuildElement("do", Required = true)]

   public TaskContainer Tasks

   {

       get

       {

           return _Tasks;

       }

       set

       {

           _Tasks = value;

       }

   }



   [TaskAttribute("level", Required = true)]

   public Level LogLevel

   {

       get

       {

           return _LogLevel;

       }

       set

       {

           _LogLevel = value;

       }

   }



   protected override void ExecuteTask()

   {

       Level OldLevel = this.Project.Threshold;

       this.Project.Threshold = this.LogLevel;

       this.Tasks.Execute();

       this.Project.Threshold = OldLevel;



   }

}


On 9/22/06, Michael Frederick <[EMAIL PROTECTED]> wrote:

 I have an <exec> task which produces output that I want to capture in a
file, but not have present in the NAnt output.  No matter what combination
of settings I have tried I cannot seem to produce this result.  Here's the
original project file:

<project name="InstallShield">

    <property name="IS.BuildCommand" value="C:\Program Files\InstallShield
10.5\System\ISCmdBld.exe"/>
    <property name="IS.ProjectPath" value="" overwrite="false" />
    <property name="IS.ProjectDir" value="${path::get-directory-name (
IS.ProjectPath)}" overwrite="false"/>
    <property name="IS.ProjectFile" value="${path::get-file-name (
IS.ProjectPath)}" overwrite="false" />
    <property name="IS.Media" value="CD" overwrite="false"/>
    <property name="IS.Args" value="-p ${IS.ProjectFile} -r ${IS.Media}
-x"/>

 <target name="go">

  <exec
   program="${IS.BuildCommand}"
   commandline="${IS.Args}"
   workingdir="${IS.ProjectDir}"
   output="ISBuild.log"
   failonerror="false"
   verbose="true"
  />
 </target>
</project>

I have tried removing the "failonerror" attribute, changing verbose to
FALSE and removing the "verbose" attribute.  I do get the output captured,
but it still appears as a *long* series of [exec] output lines in the NAnt
output.  I need to suppress this; it appears in my CCNet logs and in CCNet's
notification Emails.  Does anyone have any suggestions?

Oh, here's the NAnt version info:  NAnt 0.85 (Build 0.85.2344.0; rc4;
6/2/2006)

--
Mike Frederick
Software Developer
[EMAIL PROTECTED]


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users





--
Jay Flowers
----------------------------------------------------------------------
http://jayflowers.com
---------------------------------------------------------------------
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to