ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: setLevel on echo task in JavaScript
Date Wed, 02 Mar 2005 14:41:16 GMT
you could also let the project instance do logging ...

<project>

<script language="javascript"> <![CDATA[
    // as defined in oata.Project
    msgErr = 0;
    msgWarn = 1;
    msgInfo = 2;
    msgVerbose = 3;
    msgDebug = 4;
    
    project.log("error", msgErr);
    project.log("warn", msgWarn);
    project.log("info", msgInfo);
    project.log("verbose", msgVerbose);
    project.log("debug", msgDebug);

    project.log("as info");
]]></script>

</project>


Jan

> -----Ursprüngliche Nachricht-----
> Von: Shatzer, Larry [mailto:Larry.Shatzer@MIROtechnologies.com]
> Gesendet am: Mittwoch, 2. März 2005 00:02
> An: 'Ant Users List'
> Betreff: RE: setLevel on echo task in JavaScript
> 
> > -----Original Message-----
> > From: Dominique Devienne [mailto:DDevienne@lgc.com]
> > Sent: Tuesday, March 01, 2005 2:47 PM
> > To: Ant Users List
> > Subject: RE: setLevel on echo task in JavaScript
> > 
> > > With that I get: ReferenceError: "EchoLevel" is not defined.
> > 
> > I guess it's because it's an inner class (even a static one).
> > I find JavaScript quirky quiet often ;-)
> > 
> > Maybe importClass(...Echo);
> > With info = new Echo.EchoLevel();
> > 
> > Would have worked better.
> > 
> > > So I used this instead:
> > > 
> > > info = Packages.org.apache.tools.ant.taskdefs.Echo.EchoLevel();
> > > info.setValue("info");
> > 
> > Thanks for sharing. I didn't know you could skip the new!
> > 
> > Live and learn ;-) --DD
> > 
> 
> That was a typo on my part. After I sent the response, I 
> changed it to have
> the 'new', since it is more readable.
> 
> Thanks for your help.
> 
> -- Larry
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message